Solved pkg: how to resolve conflict on install step?

bortzy

New Member


Messages: 18

Hello.

I have some conflict when I want to install new package:
pkg says it needs to remove some package to do the install.
But I don't want to remove this package as I need it.

For example, if I install openoffice:
Code:
pkg install apache-openoffice
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (2 conflicting)
  - samba47-4.7.12 conflicts with samba48-4.8.7 on /usr/local/lib/shared-modules/idmap/ldap.so
  - samba47-4.7.12 conflicts with samba48-4.8.7 on /usr/local/lib/shared-modules/idmap/ldap.so
Checking integrity... done (0 conflicting)
The following 6 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
    samba48-4.8.7
    lxdvdrip-1.62_17
    transcode-1.1.7_37

New packages to be INSTALLED:
    apache-openoffice: 4.1.6_3
    samba47: 4.7.12
    gnome-vfs: 2.24.4_10

Number of packages to be removed: 3
Number of packages to be installed: 3
pkg says it needs to remove lxdvdrip but I need it.

Can someone help me to resolve the conflict?

My freeBSD version is:
Code:
freebsd-version -ku
12.0-RELEASE-p2
12.0-RELEASE-p2
I've tried to do a pkg upgrade -f unfortunately as it ends with:
Code:
[609/610] Installing emby-server-3.5.3.0...
===> Creating groups.
Using existing group 'emby'.
===> Creating users
Creating user 'emby' with uid '989'.
pw: user 'emby' disappeared during update
pkg: PRE-INSTALL script failed
 

olli@

Well-Known Member
Developer

Reaction score: 276
Messages: 315

That's strange … I wonder why samba 4.8 is installed on your machine? As far as I can tell, it is not a dependency of the lxdvdrip or transcode ports. And samba 4.8 is not the default version anyway. Did you do something special when you installed it? And are your packages up to date? Mixing old packages with new ones might lead to problems like that. Maybe try to remove the samba 4.8 package (which will also remove lxdvdrip in the process), then re-install lxdvdrip. I'm pretty sure it won't fetch samba 4.8 again.

If that still doesn't work, the problem can be solved in several ways, but all of them require building the software yourself from the Ports Collection. One way would be to get rid of the samba dependency, as talsamon explained above. Another way would be to enforce samba 4.8 as the default version, so it won't try to install samba 4.7. You can do that with the following line in /etc/make.conf:
DEFAULT_VERSIONS+= samba=4.8
 
OP
OP
bortzy

bortzy

New Member


Messages: 18

Thanks everybody for your answers.
@k.jacker
Thanks, it works.

Yes, it's strange.
No my FreeBSD is as simple as possible: nothing special. I use ZFS.
packages are up to date as I done a pkg upgrade -f one hour ago.

Is there a way to see which package except lxdvdrip uses samba 4.8?
Maybe I need samba because I use the mount_smbfs command?
Or openoffice need it to use CIFS?

Trying to reinstall lxdvdrip with openoffice installed:

Code:
pkg install lxdvdrip
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (2 conflicting)
  - samba48-4.8.7 conflicts with samba47-4.7.12 on /usr/local/lib/shared-modules/idmap/ldap.so
  - samba48-4.8.7 conflicts with samba47-4.7.12 on /usr/local/lib/shared-modules/idmap/ldap.so
Checking integrity... done (0 conflicting)
The following 7 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
    samba47-4.7.12
    apache-openoffice-4.1.6_3
    gnome-vfs-2.24.4_10

New packages to be INSTALLED:
    lxdvdrip: 1.62_17
    samba48: 4.8.7
    emby-server: 3.5.3.0
    transcode: 1.1.7_37

Number of packages to be removed: 3
Number of packages to be installed: 4

The operation will free 256 MiB.

Proceed with this action? [y/N]: y
[1/7] Deinstalling apache-openoffice-4.1.6_3...
[1/7] Deleting files for apache-openoffice-4.1.6_3: 100%
[2/7] Deinstalling gnome-vfs-2.24.4_10...
[2/7] Deleting files for gnome-vfs-2.24.4_10: 100%
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/desktop_default_applications.schemas"
Failed to open `/usr/local/etc/gconf/schemas/desktop_default_applications.schemas': No such file or directory
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/desktop_gnome_url_handlers.schemas"
Failed to open `/usr/local/etc/gconf/schemas/desktop_gnome_url_handlers.schemas': No such file or directory
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/system_dns_sd.schemas"
Failed to open `/usr/local/etc/gconf/schemas/system_dns_sd.schemas': No such file or directory
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/system_http_proxy.schemas"
Failed to open `/usr/local/etc/gconf/schemas/system_http_proxy.schemas': No such file or directory
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/system_smb.schemas"
Failed to open `/usr/local/etc/gconf/schemas/system_smb.schemas': No such file or directory
[3/7] Deinstalling samba47-4.7.12...
[3/7] Deleting files for samba47-4.7.12: 100%
[4/7] Installing samba48-4.8.7...
[4/7] Extracting samba48-4.8.7: 100%
[5/7] Installing transcode-1.1.7_37...
[5/7] Extracting transcode-1.1.7_37: 100%
[6/7] Installing lxdvdrip-1.62_17...
[6/7] Extracting lxdvdrip-1.62_17: 100%
[7/7] Installing emby-server-3.5.3.0...
===> Creating groups.
Using existing group 'emby'.
===> Creating users
Using existing user 'emby'.
[7/7] Extracting emby-server-3.5.3.0: 100%
...
Those I/O warning can be ignored? Same problem of openoffice desinstallation...

I have another question with Port Collection:
I read it is not recommended to mix software installation with pkg and ports?
Can I do the installation explained by olli@ without any risk?
 

olli@

Well-Known Member
Developer

Reaction score: 276
Messages: 315

Is there a way to see which package except lxdvdrip uses samba 4.8?
Yes: pkg info -r samba48
Maybe I need samba because I use the mount_smbfs command?
No, the mount_smbfs(8) command is part of FreeBSD's base system and does not require any ports.
Code:
pkg install lxdvdrip
[...]
Installed packages to be REMOVED:
    samba47-4.7.12
    apache-openoffice-4.1.6_3
    gnome-vfs-2.24.4_10

New packages to be INSTALLED:
    lxdvdrip: 1.62_17
    samba48: 4.8.7
    emby-server: 3.5.3.0
    transcode: 1.1.7_37
Ok, so it is the emby-server package that pulls samba48 in. According to the Makefile of the multimedia/emby-server port, it specifically requires samba48, so it probably wouldn't work with samba47 nor completely without samba.
However, I don't see how emby-server is pulled in. It is apparently not a dependency of transcode or lxdvdrip.
Please try the command pkg info -r emby-server. It should display which packages require it.
Those I/O warning can be ignored? Same problem of openoffice desinstallation...
Yes. It means that some files could not be removed upon deinstallation, because they're not present. That can happen sometimes. Normally it's nothing to worry about.
I have another question with Port Collection:
I read it is not recommended to mix software installation with pkg and ports?
Well, yes, that's true. It is possible to mix, but you should do that only if you know exactly what you're doing. One problem is that your ports collection is probably from a different date than the package repository from which you installed packages. That means it is possible a port was updated between those two dates, which can lead to incompatibilities, especially if dependencies changed. Another important thing to know: Once you built something with non-default options from the Ports Collection, you cannot update it with pkg(8), because that would pull in the packages with the default options again. Instead, you'll have to update your Ports Collection (e.g. using portsnap(8)) and rebuild the ports involved. Be aware that this is more work.
Can I do the installation explained by olli@ without any risk?
That's a tough question. I can't really give you good advice on this one. Yes, there is a certain risk.
Basically, this is the situation:
  • The apache-openoffice package pulls in samba47 as a dependency (via the gnome-vfs package).
  • The lxdvdrip package pulls in samba48 as a dependency (obviously via the emby-server package, though I don't know why).
  • samba47 and samba48 cannot be installed at the same time because of conflicting files.
  • Therefore you cannot have both apache-openoffice and lxdvdrip at the same time.
One solution would be to build the devel/gnome-vfs without samba support. I think this is worth giving a try.
Code:
Remove the existing samba package.
# cd /usr/ports/devel/gnome-vfs
# make config
That command displays a menu with options. Disable the SAMBA option (i.e. remove the checkmark).
# make showconfig
In the output from that command, verify that SAMBA is really “off”.
# make install
That should install gnome-vfs without samba.
# cd /usr/ports/editors/openoffice-4
# make install
Now you should have apache-openoffice installed without samba.
You should now be able to install lxdvdrip without conflict. However, note that you cannot update your apache-openoffice with pkg(8) once you have installed it it like that from the Ports Collection; see my remark above about mixinf pkg and ports.

Another solution would be to install one of the two (e.g. lxdvdrip) inside a so-called “jail” environment that has its own /usr/local, so there is no conflict. However, setting up a jail is somewhat complex if you haven't done that before.
 

bjs

Member

Reaction score: 2
Messages: 41

Actually, I think you will find that the dependency for Samba is in the Emby-server port... When I tried to play around with Emby I had to edit the make file and remove the dependency on Samba to get it installed using portmaster....

Edit: Okay olli@ beat me to the reply... To expand a little on my answer, I believe I found the information on the Emby forums for the FreeBSD port... It was suggested there that the port could be built without the dependency as long as you did not need it... After said editing use pkg lock to stop any complaining about missing dependencies... When it's time to upgrade Emby, just unlock the pkg, update ports, re-edit the make file if still needed, update emby and relock the pkg....
 
Last edited:

Vull

Well-Known Member

Reaction score: 119
Messages: 285

Here's an idea, not really a recommendation, just food for thought, based on very little experience. Subject to comment by more experienced forum members who know more about these things than I do.

Starting over from scratch, modify /usr/ports/Mk/bsd.default-versions.mk and change SAMBA_DEFAULT?= 4.7 to SAMBA_DEFAULT?=4.8. Next, build samba48 from ports as your first build. Then try to build apache-openoffice and see if it doesn't go ahead and use samba48 (which is already installed) instead of building samba47. If that works, then it should be no problem to build the rest from ports, although it will definitely take more time to build everything than it would to install from packages.

Seems to me that it SHOULD work, or MIGHT work... but I am only an egg at these kinds of builds. It was only very recently that I learned that FreeBSD even had this kind of flexibility.
 

talsamon

Daemon

Reaction score: 273
Messages: 1,807

The emby-server has no CONFIGURE_ARGS. I read it was upstream requested for an option for samba48, but it seems they did not do it till now.
So I would say ask the maintainer. You can find the maintainer email-address in the Makefile.
Btw, it build and installs without LIB_DEPENDS=libsmbclient.so:net/samba48. But I have not tested if it works (I never worked with it).
 

Lamia

Active Member

Reaction score: 31
Messages: 194

It is absolutely true not to mix ports and pkgs. One doesn't know how terrible the mistake is until they are faced with conflicts. And I mean more terrible ones particularly during upgrades.

At the same time, it is just nearly impossible not to mix them particularly when one is trying to install some heavy pkgs like office, browsers and so on.

My advice is to stick to one approach - say ports. If you need change options in pkgs before being installed, ports are great for that. When it is becoming difficult to get those heavy packages installed, you could use pkg. You must minimize the use of pkg. That is, do all you can to install via ports first even if it means installing all dependencies via ports and then the actual package via pkg.

At that point, you should start considering using poudriere. And if you new to Unix, go with pkg only, no ports.
 

Lamia

Active Member

Reaction score: 31
Messages: 194

The emby-server has no CONFIGURE_ARGS. I read it was upstream requested for an option for samba48, but it seems they did not do it till now.
So I would say ask the maintainer. You can find the maintainer email-address in the Makefile.
Btw, it build and installs without LIB_DEPENDS=libsmbclient.so:net/samba48. But I have not tested if it works (I never worked with it).
Emby-server 3.5 from ports & pkg isn't working (on Fbsd 11.2) owing to some version conflicts. Your best bet is to do a 'pkg install --force get-emby-server-pkg-from-its-releases-github-page'.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,268
Messages: 29,700

Starting over from scratch, modify /usr/ports/Mk/bsd.default-versions.mk and change SAMBA_DEFAULT?= 4.7 to SAMBA_DEFAULT?=4.8. Next, build samba48 from ports as your first build. Then try to build apache-openoffice and see if it doesn't go ahead and use samba48 (which is already installed) instead of building samba47. If that works, then it should be no problem to build the rest from ports, although it will definitely take more time to build everything than it would to install from packages.
This has exactly the same effect as setting DEFAULT_VERSIONS+= samba=4.8 in /etc/make.conf. Don't edit bsd.default-versions.mk. The whole point of that file is to allow settings to be overruled in make.conf.
 
OP
OP
bortzy

bortzy

New Member


Messages: 18

One solution would be to build the devel/gnome-vfs without samba support. I think this is worth giving a try.
Code:
Remove the existing samba package.
# cd /usr/ports/devel/gnome-vfs
# make config
That command displays a menu with options. Disable the SAMBA option (i.e. remove the checkmark).
# make showconfig
In the output from that command, verify that SAMBA is really “off”.
# make install
That should install gnome-vfs without samba.
# cd /usr/ports/editors/openoffice-4
# make install
Now you should have apache-openoffice installed without samba.
You should now be able to install lxdvdrip without conflict.
I follow your commands.
make install of gnome-vfs returns error about unknown type struct ssl_st.
So I install openssl-1.0.2q,1 and it compiles.

Now the lxdvdrip install can be done:
Code:
pkg install lxdvdrip
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking integrity... done (2 conflicting)
  - samba48-4.8.7 conflicts with samba47-4.7.12 on /usr/local/lib/shared-modules/idmap/ldap.so
  - samba48-4.8.7 conflicts with samba47-4.7.12 on /usr/local/lib/shared-modules/idmap/ldap.so
Checking integrity... done (0 conflicting)
The following 5 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
    samba47-4.7.12

New packages to be INSTALLED:
    lxdvdrip: 1.62_17
    samba48: 4.8.7
    emby-server: 3.5.3.0
    transcode: 1.1.7_37

Number of packages to be removed: 1
Number of packages to be installed: 4
I have done nothing with openoffice and now I have lxdvdrip and openoffice installed and working.
Do I need to recompile openoffice as you say?

Thanks.
 

olli@

Well-Known Member
Developer

Reaction score: 276
Messages: 315

I have done nothing with openoffice and now I have lxdvdrip and openoffice installed and working.
Do I need to recompile openoffice as you say?
No, I think that should not be necessary.
However, it might be a good idea to pkg lock gnome-vfs, so your self-built package isn't accidentally updated with a binary package that would again pull in the samba dependency.
 
Top