LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-20-2010, 09:54 AM   #1
slacky02
LQ Newbie
 
Registered: Jan 2010
Distribution: Slackware 12.2
Posts: 9

Rep: Reputation: 0
feh: error while loading shared libraries: libImlib2.so.1


hi,

i just ran into a little problem. while configure && make && make install was no problem at all, feh insists to not find libImlib2.so.1. however, it does know where the lib is. the libs are installed in:

Code:
$HOME/.local/lib
i used the following arg's with configure:

Code:
./configure --prefix=$HOME/.local -with-imlib2-prefix=$HOME/.local -with-giblib-prefix=$HOME/.local --with-imlib2=$HOME/.local/lib/imlib2
even when i use LDFLAGS=-L/home/$USER/.local/lib/libIMlib2.so.1 feh doesn't care at start time and stoically prints the follwoing error mesg:

Code:
feh: error while loading shared libraries: libImlib2.so.1: cannot open shared object file: No such file or directory
what am i missing here?
thx, slacky02
 
Old 02-20-2010, 10:58 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

First : ~.local/ → this hidden drectory is for configuration files, etc.
Not really meant for applications and libraries, I think.

Second : 'feh' and 'imlib2' packages are available from
http://slackbuilds.org/ and http://www.slacky.eu/

Please use packages, when available.
....

Starting an application with a lib dependecy in an off path place:
a) export LD_LIBRARY_PATH=/<path-to-lib>/
b) <command-to-run-application>
.....

Last edited by knudfl; 02-20-2010 at 11:01 AM.
 
Old 02-20-2010, 03:51 PM   #3
slacky02
LQ Newbie
 
Registered: Jan 2010
Distribution: Slackware 12.2
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

First : ~.local/ → this hidden drectory is for configuration files, etc.
Not really meant for applications and libraries, I think.
no, sorry. this is a directory i made to keep locally compiled software like /usr/local, only it's really local . config files go to ~/.local/etc.

Quote:
Second : 'feh' and 'imlib2' packages are available from
http://slackbuilds.org/ and http://www.slacky.eu/

Please use packages, when available.
why should i use packages, when available? also, slackbuild packages compile imlib2 from source anyway, only with less control over where i want stuff to go.

Quote:
Starting an application with a lib dependecy in an off path place:
a) export LD_LIBRARY_PATH=/<path-to-lib>/
b) <command-to-run-application>
.....
i'll try that but it shouldn't be necessary since i never had any problems with locally compiled progs.

does anybody know why feh is unable to find imlib2?

thx, slacky02

Last edited by slacky02; 02-20-2010 at 03:54 PM.
 
Old 02-20-2010, 04:04 PM   #4
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Rep: Reputation: 25
The file /etc/ld.so.conf contains paths to system libraries. Since this is a local path, that you've created, it is not listed in the ld.so.conf, therefore your custom location is not included in the library search on execution. You could add /home/<username>/.local/lib to ld.so.conf and run ldconfig -i ( as root ) to force rereading of all your libraries. The second way is using the LD_CONFIG_PATH variable, like knudfl suggested, which also tells the system where to look for libraries. For convenience you could add a line in your .bash_profile and .bashrc that reads
Code:
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/<username>/.local/lib
if you don't want to mess with the system files.

Good luck!
 
Old 02-20-2010, 04:14 PM   #5
slacky02
LQ Newbie
 
Registered: Jan 2010
Distribution: Slackware 12.2
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Refractor View Post
The file /etc/ld.so.conf contains paths to system libraries. Since this is a local path, that you've created, it is not listed in the ld.so.conf, therefore your custom location is not included in the library search on execution.
thanks for the answer. yet, feh is not the first prog i installed this way. there are many others that all need their lib's respectively. all these libs are likewise installed locally, i.e. in $HOME/.local/lib, just as imlib2 is. why do other prog's find their lib's although these are neither listed in /etc/ld.so.conf nor is the LD_LIBRARY_PATH set to the apropriate value? i use this modus operandi for many years now. it's only feh that makes trouble and i can't get my head around why. odd...

slacky02
 
Old 02-20-2010, 04:18 PM   #6
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
Quote:
Originally Posted by slacky02 View Post
Code:
feh: error while loading shared libraries: libImlib2.so.1: cannot open shared object file: No such file or directory
I am getting the same thing with a vanilla config and standard installation directories.
 
Old 02-20-2010, 04:27 PM   #7
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
Hah, figured it out, from this link.

As root, type:

Code:
ldconfig
 
Old 02-20-2010, 04:30 PM   #8
slacky02
LQ Newbie
 
Registered: Jan 2010
Distribution: Slackware 12.2
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mattca View Post
Hah, figured it out, from this link.
ahm, ... thx, yeah. good to know your problem is solved

Last edited by slacky02; 02-20-2010 at 04:55 PM.
 
Old 02-20-2010, 04:57 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Sorry. deleted ........

You are right, # ldconfig does the trick.

.....

Last edited by knudfl; 02-20-2010 at 04:59 PM.
 
Old 02-20-2010, 04:59 PM   #10
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
Quote:
Originally Posted by slacky02 View Post
ahm, ... thx, yeah. good to know your problem is solved
I posted for your benefit. Did it work for you as well?
 
Old 02-20-2010, 05:11 PM   #11
slacky02
LQ Newbie
 
Registered: Jan 2010
Distribution: Slackware 12.2
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mattca View Post
I posted for your benefit. Did it work for you as well?
thank you but no, since my problem is different from yours. but i probably just adjust LD_LIBRARY_PATH than it'll work. still i think it's odd that i didn't need to do so until i installed feh. well actually i uninstalled it already and decided i don't like it ... so nevermind guys.

thx anyway, slacky02

SOLUTION: see Refractor's post:

adjust LD_LIBRARY_PATH by doing in ~/.bash_profile:
Code:
 export LD_LIBRARY_PATH=/your/non/standard/lib/path
// note: you have to logout and login again
OR adding your non standard path to /etc/ld.so.conf and issuing ldconfig as root as mattca suggested.

slacky02

Last edited by slacky02; 02-20-2010 at 05:17 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 12:05 PM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
gxine: error while loading shared libraries: libmozjs.so: cannot open shared object.. khronosschoty Slackware 10 11-10-2008 07:33 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration