Bug 2032 - libcap-ng.so.0: cannot open shared object file
: libcap-ng.so.0: cannot open shared object file
Status: RESOLVED UPSTREAMFIX
Product: Entropy
Classification: Unclassified
Component: Package
: unspecified
: amd64 Sabayon Mainline
: P5 normal
: ---
Assigned To: Entropy Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-16 17:41 UTC by Toderel Adrian - Aurel
Modified: 2010-12-31 23:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toderel Adrian - Aurel 2010-12-16 17:41:19 UTC
system:

sabayon linux 5.0 updated to latest stable packages for 09.12.2010:

sudo equo --info | grep "Database revision"
Repository databases: sabayonlinux.org => Database revision => 2115

reproductible:

always for an up to date old system, i mean online upgrade from sabayon v4 to sabayon v5 and from that keep up to date with periodic upgrades with smartmontools already installed

steps to reproduce this bug:

sudo rc-service smartd start
 * Starting S.M.A.R.T. monitoring daemon ...
/usr/sbin/smartd: error while loading shared libraries: libcap-ng.so.0: cannot open shared object file: No such file or directory
 * start-stop-daemon: failed to start `/usr/sbin/smartd'                                                         [ !! ]
 * ERROR: smartd failed to start


hmmm ... what is this!? i remember in the past was a working utility!

equo --info log .... grrr ... is too long and look like sabayon.org pastebin is not working!?

maybe corupted binaryes!?

equo search smartmontools
>>  @@ Searching...
>>      @@ Package: sys-apps/smartmontools-5.40 branch: 5, [repo_sabayonlinux.org] 
>>          Available:      version: 5.40 ~ tag: NoTag ~ revision: 0 
>>          Installed:      version: 5.40 ~ tag: NoTag ~ revision: 0 
>>          Slot:           0 
>>          Homepage:       http://smartmontools.sourceforge.net/  
>>          Description:    control and monitor storage systems  
>>                          using the Self-Monitoring, Analysis  
>>                          and Reporting Technology System  
>>                          (S.M.A.R.T.)  
>>          License:        GPL-2 
>>   Keywords:   smartmontools 
>>   Found:      1 entries

time -p sudo equo install smartmontools
>>  @@ Calculating dependencies ...
>>  ## [R] [sabayonlinux.org] sys-apps/smartmontools-5.40|0   [5.40|0]
>>  @@ Packages needing to be installed/updated/downgraded: 1
>>  @@ Packages needing to be removed: 0
>>  @@ Download size: 0b
>>  @@ Freed disk space: 0.0b
>>  @@ You need at least: 842.8kB of free space
>>  :: (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Package checksum matches: sys-apps:smartmontools-5.40~0.tbz2
>>  ++ (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Unpacking package: sys-apps:smartmontools-5.40~0.tbz2
>>    ## Installing package: sys-apps/smartmontools-5.40
>>    ## [control and monitor storage systems using the Self-Monitoring, Analysis an...]
>>    ## Updating database: sys-apps/smartmontools-5.40
>>    ## Cleaning previously installed application data.
>>    ## Cleaning: sys-apps/smartmontools-5.40
>>  @@ Installation complete.
>>  @@ Configuration files scan complete.
real 12.38
user 4.94
sys 0.47

sudo rc-service smartd start
 * Caching service dependencies ...                                                                              [ ok ]
 * Starting S.M.A.R.T. monitoring daemon ...
/usr/sbin/smartd: error while loading shared libraries: libcap-ng.so.0: cannot open shared object file: No such file or directory
 * start-stop-daemon: failed to start `/usr/sbin/smartd'                                                         [ !! ]
 * ERROR: smartd failed to start

hmmm ... this is really strange! because i reinstall smartmontools SPM but still no working binary! why!?

locate libcap-ng
/mnt/entropy/var/cache/edb/dep/mnt/entropy/usr/portage/sys-libs/libcap-ng-0.6.1
/mnt/entropy/var/cache/edb/dep/mnt/entropy/usr/portage/sys-libs/libcap-ng-0.6.2
/mnt/entropy/usr/portage/metadata/cache/sys-libs/libcap-ng-0.6.1
/mnt/entropy/usr/portage/metadata/cache/sys-libs/libcap-ng-0.6.2
/mnt/entropy/usr/portage/metadata/cache/sys-libs/libcap-ng-0.6.4
/mnt/entropy/usr/portage/metadata/cache/sys-libs/libcap-ng-0.6.5
/mnt/entropy/usr/portage/sys-libs/libcap-ng
/mnt/entropy/usr/portage/sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild
/mnt/entropy/usr/portage/sys-libs/libcap-ng/Manifest
/mnt/entropy/usr/portage/sys-libs/libcap-ng/files
/mnt/entropy/usr/portage/sys-libs/libcap-ng/files/libcap-ng-0.6.4-fix_tests_building.patch
/mnt/entropy/usr/portage/sys-libs/libcap-ng/files/libcap-ng-gentoo.patch
/mnt/entropy/usr/portage/sys-libs/libcap-ng/files/libcap-ng-0.6.4-python.patch
/mnt/entropy/usr/portage/sys-libs/libcap-ng/libcap-ng-0.6.1.ebuild
/mnt/entropy/usr/portage/sys-libs/libcap-ng/libcap-ng-0.6.5.ebuild
/mnt/entropy/usr/portage/sys-libs/libcap-ng/libcap-ng-0.6.2.ebuild
/mnt/entropy/usr/portage/sys-libs/libcap-ng/ChangeLog
/mnt/entropy/usr/portage/sys-libs/libcap-ng/metadata.xml

locate libcap-ng.so.0
no file!

equo search libcap-ng
>>  @@ Searching...
>>      @@ Package: sys-libs/libcap-ng-0.6.2 branch: 5, [repo_sabayonlinux.org] 
>>          Available:      version: 0.6.2 ~ tag: NoTag ~ revision: 0                                                                           
>>          Installed:      version: Not installed ~ tag: N/A ~ revision: N/A                                                                   
>>          Slot:           0                                                                                                                   
>>          Homepage:       http://people.redhat.com/sgrubb/libcap-ng/  
>>          Description:    POSIX 1003.1e capabilities  
>>          License:        LGPL-2.1 
>>   Keywords:   libcap-ng 
>>   Found:      1 entries

hey! is not installed! but still:

ldd $(sudo which smartd)
        linux-vdso.so.1 =>  (0x00007f8454847000)
        libcap-ng.so.0 => not found
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/libstdc++.so.6 (0x00007f845431b000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f8454104000)
        libc.so.6 => /lib/libc.so.6 (0x00007f8453daa000)
        libm.so.6 => /lib/libm.so.6 (0x00007f8453b29000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f845462b000)

so, this means that installing smartmontools SPM entropy infrastructure do not check and pull in all required dependencies? because libcap-ng is not installed!

time -p sudo equo install sys-libs/libcap-ng
>>  @@ Calculating dependencies ...
>>  ## [N] [sabayonlinux.org] sys-libs/libcap-ng-0.6.2|0
>>  @@ Packages needing to be installed/updated/downgraded: 1
>>  @@ Packages needing to be removed: 0
>>  @@ Download size: 99.9kB
>>  @@ Used disk space: 2.7MB
>>  @@ You need at least: 2.9MB of free space
>>  :: (1/1) >>> sys-libs/libcap-ng-0.6.2
>>    ## Downloading archive: sys-libs:libcap-ng-0.6.2~0.tbz2
>>    ## ( mirror #1 ) Downloading from: http://na.mirror.garr.it
>>    ## ( mirror #1 ) Successfully downloaded from: http://na.mirror.garr.it at 581.7kB/second
>>    ## Package checksum matches: sys-libs:libcap-ng-0.6.2~0.tbz2
>>       : GPG matches
>>       : SHA1 matches
>>       : SHA256 disabled
>>       : SHA512 disabled
>>  ++ (1/1) >>> sys-libs/libcap-ng-0.6.2
>>    ## Unpacking package: sys-libs:libcap-ng-0.6.2~0.tbz2
>>    ## Installing package: sys-libs/libcap-ng-0.6.2
>>    ## [POSIX 1003.1e capabilities]
>>    ## Updating database: sys-libs/libcap-ng-0.6.2
>>    ## Cleaning previously installed application data.
>>> Regenerating /etc/ld.so.cache...
>>    ## Cleaning: sys-libs/libcap-ng-0.6.2
>>  @@ Installation complete.
>>  @@ Configuration files scan complete.
real 20.09
user 4.72
sys 0.64

ldd $(sudo which smartd)
        linux-vdso.so.1 =>  (0x00007fffd5317000)
        libcap-ng.so.0 => /usr/lib/libcap-ng.so.0 (0x00007fa29cd83000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/libstdc++.so.6 (0x00007fa29ca73000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fa29c85c000)
        libc.so.6 => /lib/libc.so.6 (0x00007fa29c502000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa29cf88000)
        libm.so.6 => /lib/libm.so.6 (0x00007fa29c281000)

and 

sudo rc-service smartd start
 * Starting S.M.A.R.T. monitoring daemon ...                                                                                              [ ok ]

for me problem solved but maybe not for many oldies sabayon users!
Comment 1 Toderel Adrian - Aurel 2010-12-16 18:38:27 UTC
still puzzled:
equo query required libcap-ng.so.0
>>  @@ Required Search...
>>      @@ Package: sys-apps/smartmontools-5.40 branch: 5, [__system__] 
>>          Installed:    version: 5.40 ~ tag: NoTag ~ revision: 0 
>>          Homepage:     http://smartmontools.sourceforge.net/  
>>      @@ Package: sys-libs/libcap-ng-0.6.2 branch: 5, [__system__] 
>>          Installed:    version: 0.6.2 ~ tag: NoTag ~ revision: 0 
>>          Homepage:     http://people.redhat.com/sgrubb/libcap-ng/  
>>   Library:   libcap-ng.so.0 
>>   Found:     2 packages

equo query needed smartmontools
>>  @@ Needed Search...
>>        # libc.so.6
>>        # libcap-ng.so.0
>>        # libgcc_s.so.1
>>        # libstdc++.so.6
>>   Package:   sys-apps/smartmontools-5.40 
>>   Found:     4 libraries 

look like in entropy libcap-ng.so.0 is registered as required dependencies for smartmontools! then why is not pulled in!? 

to be 100% sure is a real bug:

sudo rc-service smartd stop
sudo equo remove smartmontools
sudo equo remove libcap-ng

sudo equo install smartmontools
>>  @@ Calculating dependencies ...
>>  ## [N] [sabayonlinux.org] sys-apps/smartmontools-5.40|0
>>  @@ Packages needing to be installed/updated/downgraded: 1
>>  @@ Packages needing to be removed: 0
>>  @@ Download size: 0b
>>  @@ Used disk space: 1.7MB
>>  @@ You need at least: 2.6MB of free space
>>  :: (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Package checksum matches: sys-apps:smartmontools-5.40~0.tbz2
>>  ++ (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Unpacking package: sys-apps:smartmontools-5.40~0.tbz2
>>    ## Installing package: sys-apps/smartmontools-5.40
>>    ## [control and monitor storage systems using the Self-Monitoring, Analysis an...]
>>    ## Updating database: sys-apps/smartmontools-5.40
>>    ## Cleaning previously installed application data.
>>    ## Cleaning: sys-apps/smartmontools-5.40
>>  @@ Installation complete.
>>  @@ Configuration files scan complete.

sudo equo install smartmontools --deep
>>  @@ Calculating dependencies ...
>>  ## [R] [sabayonlinux.org] sys-apps/smartmontools-5.40|0   [5.40|0]
>>  @@ Packages needing to be installed/updated/downgraded: 1
>>  @@ Packages needing to be removed: 0
>>  @@ Download size: 0b
>>  @@ Freed disk space: 0.0b
>>  @@ You need at least: 842.8kB of free space
>>  :: (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Package checksum matches: sys-apps:smartmontools-5.40~0.tbz2
>>  ++ (1/1) >>> sys-apps/smartmontools-5.40
>>    ## Unpacking package: sys-apps:smartmontools-5.40~0.tbz2
>>    ## Installing package: sys-apps/smartmontools-5.40
>>    ## [control and monitor storage systems using the Self-Monitoring, Analysis an...]
>>    ## Updating database: sys-apps/smartmontools-5.40
>>    ## Cleaning previously installed application data.
>>    ## Cleaning: sys-apps/smartmontools-5.40
>>  @@ Installation complete.
>>  @@ Configuration files scan complete.

equo query needed smartmontools
>>  @@ Needed Search...
>>        # libc.so.6
>>        # libcap-ng.so.0
>>        # libgcc_s.so.1
>>        # libstdc++.so.6
>>   Package:   sys-apps/smartmontools-5.40 
>>   Found:     4 libraries

i think here a command like » equo query provide libcap-ng.so.0 « can be very useful if you need to search what entropy package provide a needed atom

» equo query belongs libcap-ng.so.0 « is not working only if libcap-ng is installed and only with full path in command because is searching for files not entropy atoms! if an » equo query provide « will be more easy to find entropy package name for a required, and missing, library

time -p sudo equo install libcap-ng
equo query belongs libcap-ng.so.0
>>  @@ Belong Search...
>>   Keyword:   libcap-ng.so.0 
>>   Found:     0 entries

this means i need too many extra steps if i want to check what libraries is provided by an entropy binary package:

equo query files libcap-ng | grep libcap-ng.so.0
>>  ### /usr/lib64/libcap-ng.so.0
>>  ### /usr/lib64/libcap-ng.so.0.0.0

equo query belongs /usr/lib64/libcap-ng.so.0
>>  @@ Belong Search...
>>      @@ Package: sys-libs/libcap-ng-0.6.2 branch: 5, [__system__] 
>>          Installed:      version: 0.6.2 ~ tag: NoTag ~ revision: 0 
>>          Slot:           0 
>>          Homepage:       http://people.redhat.com/sgrubb/libcap-ng/  
>>          Description:    POSIX 1003.1e capabilities  
>>          License:        LGPL-2.1 
>>   Keyword:   /usr/lib64/libcap-ng.so.0 
>>   Found:     1 entries

is like a stupid logic contraption, if i need to check what package provide libcap-ng.so.0 i need to know already that, install needed entropy binary package the check if is really in it my library ...

pastebin not working 

equo --version
entropy: 0.99.51.4 
equo: 0.99.51.4
Comment 2 Joost Ruis Staff 2010-12-17 13:51:25 UTC
BZ-PC-12 jruis # /etc/init.d/smartd start
 * Starting S.M.A.R.T. monitoring daemon ...                                                                                                     [ ok ]

No problems here, did you run a deptest?
Comment 3 Joost Ruis Staff 2010-12-17 13:53:17 UTC
In addition:


BZ-PC-12 jruis # ldd /usr/sbin/smartd
	linux-gate.so.1 =>  (0xffffe000)
	libcap-ng.so.0 => /usr/lib/libcap-ng.so.0 (0xb77e9000)
	libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libstdc++.so.6 (0xb76f8000)
	libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libgcc_s.so.1 (0xb76d9000)
	libc.so.6 => /lib/libc.so.6 (0xb7593000)
	/lib/ld-linux.so.2 (0xb7812000)
	libm.so.6 => /lib/libm.so.6 (0xb756c000)

BZ-PC-12 jruis # equery belongs /usr/lib/libcap-ng.so.0
 * Searching for /usr/lib/libcap-ng.so.0 ... 
sys-libs/libcap-ng-0.6.2 (/usr/lib/libcap-ng.so.0 -> libcap-ng.so.0.0.0)
sys-libs/libcap-ng-0.6.2 (/usr/lib/libcap-ng.so.0.0.0)

I'm using 32bits Sabayon here.
Comment 4 Joost Ruis Staff 2010-12-17 14:12:30 UTC
Turns out it is simply a missing RDEPEND. The bug belongs upstream Gentoo.


>>  @@  (1/1) [repo:sabayonlinux.org] package: sys-apps/smartmontools-5.40 blacklisted dependencies !!!:
>>      # dev-lang/gnat-gcc:4.3
>>  @@  (1/1) [repo:sabayonlinux.org] package: sys-apps/smartmontools-5.40 is missing the following dependencies:
>>    ## (u'libcap-ng.so.0', 2):
>>      # sys-libs/libcap-ng:0
Do you want to add them? [Yes/No] 

I will add this depend in Entropy. Feel free to report it upstream Gentoo.
Comment 5 Joost Ruis Staff 2010-12-17 14:30:01 UTC
Nevermind, reported it upstream.
http://bugs.gentoo.org/show_bug.cgi?id=348951

Thanks for reporting it
Comment 6 Toderel Adrian - Aurel 2010-12-31 23:22:32 UTC
checking now, using my laptop where i still have this problem, because i do not upgrade so often my system and i do not use smartd service so often:

sudo rc-service smartd start
 * Starting S.M.A.R.T. monitoring daemon ...
/usr/sbin/smartd: error while loading shared libraries: libcap-ng.so.0: cannot open shared object file: No such file or directory
 * start-stop-daemon: failed to start `/usr/sbin/smartd'                                                               [ !! ]
 * ERROR: smartd failed to start

time sudo equo update

sudo equo --info | grep "Database revision"
Repository databases: sabayonlinux.org => Database revision => 2138

time sudo equo install smartmontools
>>  @@ Calculating dependencies ...
>>  ## [N] [sabayonlinux.org] sys-libs/libcap-ng-0.6.2|0
>>  ## [U] [sabayonlinux.org] sys-apps/smartmontools-5.40|1   [5.40|0]
.
.
blablabla
.
.

sudo rc-service smartd start
 * Caching service dependencies ...                                                                                    [ ok ]
 * Starting S.M.A.R.T. monitoring daemon ...                                                                           [ ok ]

yes, i can confirm, problem solved from sabayon and entropy infrastructure point of view ... also in upstream gentoo portage tree is solved and changes already pulled in by a new smartmontool entropy package, smartmontools-5.40|1 ... for sabayon users with this problem is only a need to update entropy database  and reinstall smartmontools ... for those sabayon users who frequently upgrade their system this bug can fly away unnoticed ...

;-)