missing dependency libdb-5

Bug #1435622 reported by Moses Moore
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
moc (Ubuntu)
Invalid
Undecided
Elimar Riesebieter

Bug Description

Seems that MOC needs a library that isn't in the package requirements.

Steps to reproduce:
$ sudo apt-get install moc
$ mocp

Expected result:
MOC client starts

Seen result:
"mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory"

Other information:
$ ldd `which mocp` |grep 'not found'
libdb-5.1.so => not found

Workaround:
$ sudo apt-get install libdb5.1

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: moc 1:2.5.0~beta1+svn20131120-1
ProcVersionSignature: Ubuntu 3.13.0-46.77-generic 3.13.11-ckt15
Uname: Linux 3.13.0-46-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.7
Architecture: i386
CurrentDesktop: XFCE
Date: Mon Mar 23 19:55:19 2015
InstallationDate: Installed on 2013-06-08 (653 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
SourcePackage: moc
UpgradeStatus: Upgraded to trusty on 2014-04-20 (337 days ago)

Revision history for this message
Moses Moore (moses-ubuntu) wrote :
Revision history for this message
Elimar Riesebieter (riesebie) wrote :

I've startet 14.04.2 live stick and can't reproduce?

$ ldd `which mocp` | grep libdb
libdb-5.3.so => /usr/lib/x86_64-linux-gnu/libdb-5.3.so (0x00007f6fa5ddc000)

The package is always build against libdb-dev which makes sure the binary loads the realted lib.

BTW there is 2.5.0 available.

--
   Elimar
   moc's Debian maintainer

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

The stick you used probably has libdb5.1 installed because it's a dependency of some other packaage.

The point is, it's not a dependency of *this* package. And it should be, because the software won't run without it.

And I do have 2.5.0 installed, which you'd see if you read the original bug report.

Revision history for this message
Elimar Riesebieter (riesebie) wrote : Re: [Bug 1435622] Re: missing dependency libdb-5

* Moses Moore <email address hidden> [2015-03-24 14:34 -0000]:

> The stick you used probably has libdb5.1 installed because it's a
> dependency of some other packaage.
>
> The point is, it's not a dependency of *this* package. And it should
> be, because the software won't run without it.
>
> And I do have 2.5.0 installed, which you'd see if you read the original
> bug report.

Hmm I see:
...
Package: moc 1:2.5.0~beta1+svn20131120-1
...

which is a bit old. Think you should upgrade to at least 14.04 LTS2

Elimar
--
  Do you smell something burning or is it me?

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 14:34 -0000]:

> The stick you used probably has libdb5.1 installed because it's a
> dependency of some other packaage.
>
> The point is, it's not a dependency of *this* package. And it should
> be, because the software won't run without it.

Check out:

$ apt-cache show moc

and you'll find libdb($VERSION) in the Depends section.

Elimar
--
 Learned men are the cisterns of knowledge,
  not the fountainheads ;-)

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

I'm already at LTS 2

$ cat /etc/issue
Ubuntu 14.04.2 LTS \n \l

And checking apt-cache show moc I see
Depends: libasound2 (>= 1.0.16), libc6 (>= 2.15), libcurl3-gnutls (>= 7.16.2), libdb5.3,

But:
$ ldd `which mocp` |grep libdb
 libdb-5.3.so => /usr/lib/i386-linux-gnu/libdb-5.3.so (0xb716f000)
 libdb-5.1.so => not found

So it's linked to a verison of libdb that isn't in the 'Depends:' line of the package.

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 19:12 -0000]:

> I'm already at LTS 2
>
> $ cat /etc/issue
> Ubuntu 14.04.2 LTS \n \l

$ lsb_release -a would be the correct way to grep your Ubuntu
version. Anyway

>
> And checking apt-cache show moc I see
> Depends: libasound2 (>= 1.0.16), libc6 (>= 2.15), libcurl3-gnutls (>= 7.16.2), libdb5.3,
>
> But:
> $ ldd `which mocp` |grep libdb
> libdb-5.3.so => /usr/lib/i386-linux-gnu/libdb-5.3.so (0xb716f000)
> libdb-5.1.so => not found

Could you please try as follows:

# apt-get remove --purge moc
# apt-get autoremove
# apt-get install moc

And check again?

Thanks
Elimar
--
 You cannot propel yourself forward by
  patting yourself on the back.

Revision history for this message
Moses Moore (moses-ubuntu) wrote :
Download full text (3.2 KiB)

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

$ sudo apt-get remove --purge moc
The following packages will be REMOVED:
  moc* moc-ffmpeg-plugin*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 889 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 346281 files and directories currently installed.)
Removing moc-ffmpeg-plugin (1:2.5.0~beta1+svn20131120-1) ...
Removing moc (1:2.5.0~beta1+svn20131120-1) ...
Purging configuration files for moc (1:2.5.0~beta1+svn20131120-1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libopusfile0 librcc0 librcd0 libsidutils0 linux-headers-3.13.0-45
  linux-headers-3.13.0-45-generic linux-image-3.13.0-45-generic
  linux-image-extra-3.13.0-45-generic linux-tools-3.13.0-45
  linux-tools-3.13.0-45-generic
0 upgraded, 0 newly installed, 10 to remove and 0 not upgraded.
After this operation, 225 MB disk space will be freed.
Do you want to continue? [Y/n] y

$ sudo apt-get install moc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libopusfile0 librcc0 librcd0 libsidutils0
Suggested packages:
  moc-ffmpeg-plugin
The following NEW packages will be installed:
  libopusfile0 librcc0 librcd0 libsidutils0 moc
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/389 kB of archives.
After this operation, 1,343 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libopusfile0.
(Reading database ... 316276 files and directories currently installed.)
Preparing to unpack .../libopusfile0_0.5-1_i386.deb ...
Unpacking libopusfile0 (0.5-1) ...
Selecting previously unselected package libsidutils0.
Preparing to unpack .../libsidutils0_2.1.1-14_i386.deb ...
Unpacking libsidutils0 (2.1.1-14) ...
Selecting previously unselected package librcd0.
Preparing to unpack .../librcd0_0.1.13-3build1_i386.deb ...
Unpacking librcd0 (0.1.13-3build1) ...
Selecting previously unselected package librcc0.
Preparing to unpack .../librcc0_0.2.9-3.1ubuntu1_i386.deb ...
Unpacking librcc0 (0.2.9-3.1ubuntu1) ...
Selecting previously unselected package moc.
Preparing to unpack .../moc_1%3a2.5.0~beta1+svn20131120-1_i386.deb ...
Unpacking moc (1:2.5.0~beta1+svn20131120-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Setting up libopusfile0 (0.5-1) ...
Setting up libsidutils0 (2.1.1-14) ...
Setting up librcd0 (0.1.13-3build1) ...
Setting up librcc0 (0.2.9-3.1ubuntu1) ...
Setting up moc (1:2.5.0~beta1+svn20131120-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for menu (2.1.46ubuntu1) ...

$ mocp
mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory...

Read more...

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

wait hangon that might've been *.deb files from my local cache, since I've been installing and uninstalling the package for the past few days. I should've run `apt-get clean` first to make sure I download fresh *.deb files from the repositories.

$ sudo apt-get autoclean
$ sudo apt-get clean
$ sudo apt-get check # for good measure
$ apt-get remove --purge moc
$ sudo apt-get autoremove

$ sudo apt-get install moc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libopusfile0 librcc0 librcd0 libsidutils0
Suggested packages:
  moc-ffmpeg-plugin
The following NEW packages will be installed:
  libopusfile0 librcc0 librcd0 libsidutils0 moc
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 389 kB of archives.
After this operation, 1,343 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe libopusfile0 i386 0.5-1 [42.6 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe libsidutils0 i386 2.1.1-14 [27.5 kB]
Get:3 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe librcd0 i386 0.1.13-3build1 [59.3 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe librcc0 i386 0.2.9-3.1ubuntu1 [41.2 kB]
Get:5 http://ca.archive.ubuntu.com/ubuntu/ trusty/universe moc i386 1:2.5.0~beta1+svn20131120-1 [218 kB]
Fetched 389 kB in 0s (459 kB/s)
Selecting previously unselected package libopusfile0.
(Reading database ... 316276 files and directories currently installed.)
Preparing to unpack .../libopusfile0_0.5-1_i386.deb ...
Unpacking libopusfile0 (0.5-1) ...
Selecting previously unselected package libsidutils0.
Preparing to unpack .../libsidutils0_2.1.1-14_i386.deb ...
Unpacking libsidutils0 (2.1.1-14) ...
Selecting previously unselected package librcd0.
Preparing to unpack .../librcd0_0.1.13-3build1_i386.deb ...
Unpacking librcd0 (0.1.13-3build1) ...
Selecting previously unselected package librcc0.
Preparing to unpack .../librcc0_0.2.9-3.1ubuntu1_i386.deb ...
Unpacking librcc0 (0.2.9-3.1ubuntu1) ...
Selecting previously unselected package moc.
Preparing to unpack .../moc_1%3a2.5.0~beta1+svn20131120-1_i386.deb ...
Unpacking moc (1:2.5.0~beta1+svn20131120-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Setting up libopusfile0 (0.5-1) ...
Setting up libsidutils0 (2.1.1-14) ...
Setting up librcd0 (0.1.13-3build1) ...
Setting up librcc0 (0.2.9-3.1ubuntu1) ...
Setting up moc (1:2.5.0~beta1+svn20131120-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for menu (2.1.46ubuntu1) ...
moses@deunan:~$ mocp
mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 20:06 -0000]:

> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.2 LTS
> Release: 14.04
> Codename: trusty
[...]
> $ mocp
> mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory
> $ ldd `which mocp` |grep libdb
> libdb-5.3.so => /usr/lib/i386-linux-gnu/libdb-5.3.so (0xb712c000)
> libdb-5.1.so => not found

Hmm,

what tells
$ dpkg -l | grep libdb5

Could you please try:

$ sudo ldconfig

Elimar
--
 Never make anything simple and efficient when a way
  can be found to make it complex and wonderful ;-)

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

$ dpkg -l | grep libdb5
ii libdb5.3:i386 5.3.28-3ubuntu3 i386 Berkeley v5.3 Database Libraries [runtime]

$ sudo ldconfig
( no output; successful exit code [ $? == 0 ] )

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 21:55 -0000]:

> $ dpkg -l | grep libdb5
> ii libdb5.3:i386 5.3.28-3ubuntu3 i386 Berkeley v5.3 Database Libraries [runtime]
>
> $ sudo ldconfig
> ( no output; successful exit code [ $? == 0 ] )

Did you tried to run mocp after ldconfig again?

Elimar
--
 Never make anything simple and efficient when a way
  can be found to make it complex and wonderful ;-)

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

$ sudo ldconfig ; mocp
mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 22:50 -0000]:

> $ sudo ldconfig ; mocp
> mocp: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No such file or directory

Sorry, but I can't reproduce this on a fresh 14.04.2 install on
amd64 :-( Maybe the Ubuntu packages for i386 have to be rebuild? I
am not an Ubuntu developer, though.

Elimar
--
  Do you smell something burning or is it me?

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

I already said before: the fresh install you have probably brought in libdb5.1 from another package.

The problem isn't whether libdb-5.1.so exists -- the problem is that mocp needs it, but it isn't one of the package dependencies.

On your "new Ubuntu 14.04 stick", I'd like you to try this:

$ ldd `which mocp` |grep libdb5.1

If you get a result, then mocp depends on libdb5.1. Next, try removing libdb5.1 (don't actually remove it)

$ sudo apt-get remove $(dpkg -S libdb-5.1.so |cut -d':' -f1)

The output from this attempt to remove libdb-5.1 *should* mention that it will also remove 'moc,' because mocp needs it and mocp comes from package 'moc'.
If it doesn't say that it will remove 'moc', then it's possible to install 'moc' even when one of the necessary libraries is missing.

The fix would be to update the package's "Depends:" info to include libdb5.1 . If you aren't an Ubuntu developer, at least you are an Ubuntu package maintainer, so you should know how to do this (if you are certain that it is necessary).

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

I went to check in the repository for other versions of moc, and in http://ca.archive.ubuntu.com/ubuntu/pool/universe/m/moc/ I found moc_2.5.0~beta1+svn20131120-1_i386.deb (27-Nov-2013) , which is what apt-get installs (see comment #9 above where I do a full purge, clean, and re-get), but in the same folder I see moc_2.5.0-1_i386.deb (26-Oct-2014).

Maybe this problem is already fixed in 2.5.0-1 ... but for some reason apt-get for Ubuntu 14.04.2 i386 isn't fetching this latest version?

# dpkg -l moc
ii moc 1:2.5.0-1 i386 ncurses based console audio playe
# ldd `which mocp` |grep libdb
 libdb-5.3.so => /usr/lib/i386-linux-gnu/libdb-5.3.so (0xb713d000)
 libdb-5.1.so => not found

... nope, still the same problem of the package not asking for libdb5.1 as a dependency, even in 2.5.0-1 (which somehow isn't the version used by 14.04.2 ?)

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-24 23:59 -0000]:

> I already said before: the fresh install you have probably brought in
> libdb5.1 from another package.

Nope.

My system:
Description: Ubuntu 14.04.2 LTS

$ dpkg -l | grep libdb5
ii libdb5.3:amd64 5.3.28-3ubuntu3

$ dpkg -l | grep moc
ii moc 1:2.5.0~beta1+svn201311

and mocp plays very well!

> The problem isn't whether libdb-5.1.so exists -- the problem is that
> mocp needs it, but it isn't one of the package dependencies.

No, mocp is build against libdb-dev. As far as the API doesn't
change it works with whatever libd version libddb-dev'a Api points
to.

> On your "new Ubuntu 14.04 stick", I'd like you to try this:
>
> $ ldd `which mocp` |grep libdb5.1

$ ldd /usr/bin/mocp | grep libdb
libdb-5.3.so => /usr/lib/x86_64-linux-gnu/libdb-5.3.so (0x00007f946069f000)

> If you get a result, then mocp depends on libdb5.1. Next, try removing
> libdb5.1 (don't actually remove it)

As you can realize on my system no libdb5.1 is installed.

> $ sudo apt-get remove $(dpkg -S libdb-5.1.so |cut -d':' -f1)

Doesn't make sense as it is not installed

> The output from this attempt to remove libdb-5.1 *should* mention that it will also remove 'moc,' because mocp needs it and mocp comes from package 'moc'.
> If it doesn't say that it will remove 'moc', then it's possible to install 'moc' even when one of the necessary libraries is missing.

> The fix would be to update the package's "Depends:" info to include
> libdb5.1.

No, as said before it works with all versions libdb-dev provides
with it's API.

> If you aren't an Ubuntu developer, at least you are an
> Ubuntu package maintainer, so you should know how to do this (if you are
> certain that it is necessary).

Of course I knwow this very well, as I am maintaining moc since
Sun, 14 Nov 2004. Check out

$ apt-get changelog moc

And scroll to the last line, though. And I know many, many
characters of bug posters......

Elimar
--
  Do you smell something burning or is it me?

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

> and I know many, many characters of bug posters

Is that supposed to be an insult? Please don't do that.

I see that your amd64 build of moc doesn't depend on libdb5.1. And yet I've grabbed the latest i386 build of moc (2.5.0-1) from the Ubuntu repository, and this does depend on libdb5.1

I have another Ubuntu machine, this one 64-bit

$ uname -a
Linux equius 2.6.32-042stab102.9 #1 SMP Fri Dec 19 20:34:40 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
$ dpkg -l |grep moc
ii moc 1:2.5.0~beta1+svn20131120-1
$ ldd `which mocp` |grep libdb
libdb-5.3.so => /usr/lib/x86_64-linux-gnu/libdb-5.3.so (0x00007f434c70f000)

.... hm. Still not getting moc 2.0.5-1 from the repository but the 2.5.0~beta1 instead.
But this 64-bit package doesn't have the dependency, so it matches what you saw.

I'll need to find another 32-bit machine to test further.

Something else occurred to me: maybe there's another library (a 32-bit library?) that's linking in libdb5.1, so it appears in the output of `ldd`. If that's the case, then I need to move this bug report to the other package.

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

It's librcc.
mocp -> librcc.so -> libdb5.1.so

Close this ticket. "wrong package" or "notabug"

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

* Moses Moore <email address hidden> [2015-03-26 04:11 -0000]:

> It's librcc.
> mocp -> librcc.so -> libdb5.1.so

$ apt-cache show librcc0 | grep libdb
Depends: librcd0, libenca0, libaspell15 (>= 0.60.7~20110707), libc6 (>= 2.15), libdb5.3, libxml2 (>= 2.7.4)

It seems that you have to run a:

$ sudo apt-get update && sudo apt-get dist-upgrade

Elimar
--
 We all know Linux is great... it does infinite loops in 5 seconds.
        -Linus Torvalds

Revision history for this message
Moses Moore (moses-ubuntu) wrote :

I already did a dist-upgrade before I started. You can see the effects of it in comment #8 when I did the autoremove.

Please close this ticket, mark it 'wrong package' or 'notabug'.

Revision history for this message
Elimar Riesebieter (riesebie) wrote :

It seems that the OP's system is not a clean trusty. Bug closed by the advice of the OP.

Elimar

Changed in moc (Ubuntu):
assignee: nobody → Elimar Riesebieter (riesebie)
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.