[tac_plus] error while loading shared libraries: libtacacs.so.1: cannot open shared object file: No such file or directory

heasley heas at shrubbery.net
Tue Feb 25 22:54:41 UTC 2014


Tue, Feb 25, 2014 at 11:40:28PM +0200, Alan McKinnon:
> On 25/02/2014 21:52, Eugene Fotso wrote:
> > I HAVE TRIED:
> > 
> > # ldconfig -v
> > 
> > # /opt/tacacs/bin/tac_plus -V
> > /opt/tacacs/bin/tac_plus: error while loading shared libraries:
> > libtacacs.so.1: cannot open shared object file: No such file or directory
> > -- ls -altr /usr/lib|grep libtacacs
> 
> You should rather do what I said in my other post, but the immediate
> solution to this problem is that you are looking for your libraries in
> /usr/lib and they are not there.
> 
> They will be in /opt, probably /opt/tacacs/lib
> 
> You need to find the real location of libtacacs.so.1 and put that path
> in /etc/ld.so.conf at the end then run ldconfig
> 
> This will enable the runtime loader to find and load your shared libs.
> The problem will not show up when compiling and installing as the linker
> always knows the location of the libs the compiler just built. Your
> problem occurs later at runtime.

the program header (from ld) should provide pointers to where the library
is, assuming that it actually was installed.  it might be that the linker
needs more on your system; eg:

/bin/sh ./libtool --tag=CC   --mode=link gcc -g -O2 -D_THREAD_SAFE -pthread    -g -O2 -D_THREAD_SAFE -pthread    -version-info 1:0:0 -version-number 1:0:0   -o libtacacs.la -rpath /usr/local/lib libtacacs_la-fdes.lo libtacacs_la-maxsess.lo libtacacs_la-md4.lo libtacacs_la-md5.lo libtacacs_la-packet.lo  -lpam  -lcrypt 
libtool: link: gcc -shared  -fPIC -DPIC  .libs/libtacacs_la-fdes.o .libs/libtacacs_la-maxsess.o .libs/libtacacs_la-md4.o .libs/libtacacs_la-md5.o .libs/libtacacs_la-packet.o   -lpam -lcrypt  -O2 -pthread -O2 -pthread   -pthread -Wl,-soname -Wl,libtacacs.so.1 -o .libs/libtacacs.so.1

see -rpath; make sure it added this on your system in a manner appropriate
for your installation.  if not; do it manually and reinstall.  and tell me
if that fixes it and what kind of system you are on.
> 
> 
> 
> > 
> > 
> > On Tue, Feb 25, 2014 at 12:40 PM, Eugene Fotso <efotso63 at gmail.com> wrote:
> > 
> >> Hello,
> >> I CAN'T seem to find SOLUTION for this issue I am having with
> >> "libtacacs.so.1 "
> >>
> >>     *OS= RedHat*
> >> *    tac_plusRel=F4.0.4.27a*
> >>
> >> I have installed as required, but every time I attemp to run "tac_plus", I
> >> get "*error while loading shared libraries: libtacacs.so.1: cannot open
> >> shared object file: No such file or directory"*
> >>
> >>
> >> # /etc/init.d/tac_plus start
> >>
> >> Starting Tacacs+ server: /opt/tacacs/bin/tac_plus: *error while loading
> >> shared libraries: libtacacs.so.1: cannot open shared object file: No such
> >> file or directory*
> >> tac_plus.
> >>
> >> I HAVE TRIED ALL the available SOLUTIONS online, but still NOT WORKING:
> >> HELP HELP HELP
> >>
> >>
> >> ---
> >>
> >> *# ./configure >/dev/null*
> >>
> >> configure: WARNING: i686 not found in cputable
> >>
> >> configure: WARNING: linux-gnu not found in ostable
> >>
> >> ./configure: line 8717: *pkg-config: command not found*
> >>
> >>
> >>
> >> *# make >/dev/null*
> >>
> >> processarc.o: In function `process_archive':
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/processarc.c:173: warning: the use of
> >> `tmpnam' is dangerous, better use `mkstemp'
> >>
> >> archives.o: In function `tarobject':
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:634: undefined reference to
> >> `matchpathcon'
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:640: undefined reference to
> >> `setfscreatecon'
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:802: undefined reference to
> >> `setfscreatecon'
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:804: undefined reference to
> >> `freecon'
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:826: undefined reference to
> >> `setfscreatecon'
> >>
> >> /opt/TACACS/dpkg-1.14.31/src/archives.c:618: undefined reference to
> >> `is_selinux_enabled'
> >>
> >> collect2: ld returned 1 exit status
> >>
> >> make[2]: *** [dpkg] Error 1
> >>
> >> make[1]: *** [all-recursive] Error 1
> >>
> >> make: *** [all] Error 2
> >>
> >>
> >>
> >> *# cd utils*
> >>
> >> *# make install*
> >>
> >> gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
> >> -DLOCALEDIR=\"/usr/local/share/locale\" -idirafter ../libcompat -I../lib
> >> -g -O2 -MT start-stop-daemon.o -MD -MP -MF .deps/start-stop-daemon.Tpo -c
> >> -o start-stop-daemon.o start-stop-daemon.c
> >>
> >> mv -f .deps/start-stop-daemon.Tpo .deps/start-stop-daemon.Po
> >>
> >> gcc -std=gnu99  -g -O2  -Wl,-O1 -o start-stop-daemon start-stop-daemon.o
> >> ../libcompat/libcompat.a
> >>
> >> make[1]: Entering directory `/opt/TACACS/dpkg-1.14.31/utils'
> >>
> >> test -z "/usr/local/sbin" || /bin/mkdir -p "/usr/local/sbin"
> >>
> >>   /usr/bin/install -c 'start-stop-daemon'
> >> '/usr/local/sbin/start-stop-daemon'
> >>
> >> make[1]: Nothing to be done for `install-data-am'.
> >>
> >> make[1]: Leaving directory `/opt/TACACS/dpkg-1.14.31/utils'
> >>
> >> --
> >> *Eugene "DeFOT's" FOTSO,*
> >> *"Be Well, Do Good Work and Above All, KEEP IN TOUCH!"*
> >>
> > 
> > 
> > 
> 
> 
> -- 
> Alan McKinnon
> alan.mckinnon at gmail.com
> 
> _______________________________________________
> tac_plus mailing list
> tac_plus at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/tac_plus


More information about the tac_plus mailing list