Hi all.
I try to start an application, but libucb.so1 is missing.
# appl23
# appl23ld.so.1: appl23: fatal: libucb.so1: open failed: No such file or directory
killed
#
# ldd appl23
libXm.so.3 => /usr/lib/libXm.so.3
libMrm.so.3 => /usr/lib/libMrm.so.3
libXt.so.4 => /usr/lib/libXt.so.4
libucb.so.1 => (file not found)
libX11.so.4 => /usr/lib/libX11.so.4
libthread.so.1 => /usr/lib/libthread.so.1
libposix4.so.1 => /usr/lib/libposix4.so.1
libXpm.so.4.0 => (file not found)
libm.so.1 => /usr/lib/libm.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libXi.so.5 => /usr/lib/libXi.so.5
libc.so.1 => /usr/lib/libc.so.1
libSM.so.6 => /usr/openwin/lib/libSM.so.6
libICE.so.6 => /usr/openwin/lib/libICE.so.6
libXext.so.0 => /usr/openwin/lib/libXext.so.0
libdl.so.1 => /usr/lib/libdl.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
#
# find /usr -name libucb.so.1
/usr/ucblib/libucb.so.1
/usr/ucblib/sparcv9/libucb.so.1
#
Here's my .login file
vi .login
# Erasing LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH
# Important Paths set
#setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH
# @(#)local.login 1.5 98/10/03 SMI
stty -istrip
# setenv TERM `tset -Q -`
#
# if possible, start the windows system. Give user a chance to bail out
#
if ( "`tty`" == "/dev/console" ) then
if ( "$TERM" == "sun" || "$TERM" == "sun-color" || "$TERM" == "AT386" )
then
endif logoutINHOME/bin# logout after leaving windows systemeol-C to interrupt)"
endif
After adding LD_LIBRARY_PATH
Starting OpenWindows in 2 seconds (type Control-C to interrupt)
Fatal server error:
failed to initialize core devices
giving up.
/usr/openwin/bin/xinit: Connection refused (errno 146): unable to connect to X server
/usr/openwin/bin/xinit: No such process (errno 3): Server error.
Killed
XXXXXXX console login:
I changed the path /usr/ucblib:$LD_LIBRARY_PATH to /usr/lib:$LD_LIBRARY_PATH - the Openwindows run OK thereafter.
What is wrong?
Thanks.
So add both library paths to your LD_LIBRARY_PATH:
LD_LIBRARY_PATH=/usr/lib:/usr/ucblib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
You would normally want /usr/dt/lib and /usr/openwin/lib in your LD_LIBRARY_PATH also.
vi .login
# Erasing LD_LIBRARY_PATH &
setenv LD_LIBRARY_PATH
# Important Paths set
setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH
# Openwindows
setenv LD_LIBRARY_PATH /usr/openwin/lib:$LD_LIBRARY_PATH
I tried many of variants.
But when I include the path /usr/ucblib exactly - OpenWindows doesn't run OK (e.g. start cmdtool window without csh % prompt etc.).
Setting LD_LIBRARY_PATH globally is a poor practice and leads to the issues you are experiencing. You need to either fix appl23 by recompiling it with providing the correct options or, if you have no access to the developement environment, set LD_LIBRARY_PATH just for that command:
env LD_LIBRARY_PATH=/usr/ucblib appl123
I do just the same Solaris 2.6 simply, but my box is running Solaris 8 02/04.
now, follow Jilliagre advice:
# setenv LD_LIBRARY_PATH
# setenv LD_LIBRARY_PATH /usr/ucblib:$LD_LIBRARY_PATH appl23
setenv: Too many arguments
#
That wasn't my advice. Please read closer the command I suggested.
Am I missing something? Just create a symbolic link in /usr/lib for the missing libraries. I've done this before and it worked fine. I wouldn't mess with the LD_LIBRARY_PATH
I tried to create the symbolic link for the libucb.so.1 at /usr/lib.
# ln -s /usr/ucblib/libucb.so.1 /usr/lib/libucb.so.1
#
# cd /usr/lib
# ls -l
...
...
...
libucb.so.1 -> /usr/ucblib/libucb.so.1
But after adding in LD_LYBRARY_PATH - /usr/ucblib. OpenWindows run not OK.
see above.
Thanks.
You might have something else going on. If you left breadcrumbs, remove the links you created in /usr/lib and revert .login back to original. Concentrate on getting OpenWindows working then re-create the sym links.
Is the OpenWindows error the same as before?
The answer is to not change the LD_LIBRARY_PATH for your whole environment (never a good idea anyway) so don't put the change in ~/.login or ~/.profile but to write a wrapper scipt for you particular application, e.g.:
cat appl123.sh
#!/bin/ksh
LD_LIBRARY_PATH=/usr/ucblib:/usr/lib:/usr/openwin/lib:/usr/dt/lib
export LD_LIBRARY_PATH
appl123
That way only the environment for the application is changed.
chmod appl123.sh to 755 and then run appl123.sh instead of running appl123 directly.
HTH
K. I'm going to try that today.
I did that just the same Solaris 2.6 simply.
At 2.6 version that run without problem.
What is difference?
Thanks.
That's similar to what I suggested here two days ago but you apparently failed to copy/paste ... :
http://www.unix.com/sun-solaris/128411-libucb-s0-1-open-failed.html\#post302389476
14 years.
I look for the SUNWxwrtl package therefore.