Details
Description
Debian-based distributions do not symlink the "main" shared object to the major version.
For example:
On RHEL4u4:
$ ls -l /lib/libcap.so*
lrwxrwxrwx 1 root root 11 Jun 13 2007 /lib/libcap.so -> libcap.so.1
lrwxrwxrwx 1 root root 14 Jun 12 2007 /lib/libcap.so.1 -> libcap.so.1.10
-rwxr-xr-x 1 root root 11784 Oct 7 2006 /lib/libcap.so.1.10
Notice libcap.so -> libcap.so.1
On Debian 6.02:
$ ls -l /lib/libcap.so*
lrwxrwxrwx 1 root root 14 Jan 25 10:19 /lib/libcap.so.2 -> libcap.so.2.19
rw-rr- 1 root root 16640 Aug 16 2010 /lib/libcap.so.2.19
On Ubuntu 11.04:
$ ls -l /lib/libcap.so*
lrwxrwxrwx 1 root root 14 2011-07-16 09:52 /lib/libcap.so.2 -> libcap.so.2.20
rw-rr- 1 root root 13816 2011-02-15 14:35 /lib/libcap.so.2.20
Notice there is no libcap.so -> libcap.so.2
Therefore, when jsvc attempts to load libcap.so, it fails...
I see this when running jsvc -debug ...
Attemtping to load library /lib/libcap.so
Attemtping to load library /usr/lib/libcap.so
failed loading capabilities library – /usr/lib/libcap.so: cannot open shared object file: No such file or directory.
set_caps(CAPS) failed for user 'oncommand'
Service exit with a return value of 4
If I create the libcap.so -> libcap.so.2 symlink, it works.
I'm guessing the fix for this would be to load libcap.so, libcap.so.2, libcap.so.1 in progression to see if any work.
(Note that I have performed the workaround I mentioned in https://issues.apache.org/jira/browse/DAEMON-241 to get this far.)
Attachments
Issue Links
- is related to
-
HADOOP-8133 upgrade commons-daemon.version in hadoop-project/pom.xml from 1.0.3 to 1.0.5 to avoid jsvc / libcap.so linking problem
- Resolved