Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-20-2012, 10:55 AM
|
#1
|
LQ Newbie
Registered: Mar 2012
Posts: 18
Rep: 
|
Gcc compiler not finding object files
Hey guys, I am having another problem with my gcc compiler. I has been installed correctly yet when I try to compile I keep getting this error:
/export/software/gcc-4.5.1/libexec/gcc/x86_64-unknown-linux-gnu/4.5.1/f951: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
However when I go to that location I am seeing the libmpc.so.2 file so I am wondering why I keep getting this error when trying to compile!
Please any help given will be greatly appreciated
|
|
|
04-20-2012, 11:07 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,640
|
can you show us the full command? Maybe a -L flag is missing.
|
|
|
04-20-2012, 12:02 PM
|
#3
|
LQ Newbie
Registered: Mar 2012
Posts: 18
Original Poster
Rep: 
|
The command I am issuing is gcc test.c, where test is a simple hello world program!
|
|
|
04-20-2012, 12:08 PM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,640
|
there is a libmpc related package. I do not know your os, but I think this package is missing.
|
|
|
04-20-2012, 03:18 PM
|
#5
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,709
|
what operating system is this and HOW did you install gcc
for example :
IF this is a red hat based os like fedora
you NEED to install the development group and the development libraries
not just gcc ONLY
without knowing the needed information all i can say is
install the development environment for your distro
how you do that depends on what you are using
|
|
|
04-21-2012, 12:00 AM
|
#6
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
If your libraries are in a non-standard location (i.e. not /usr/lib, /usr/lib64 or the like) you need to set LD_LIBRARY_PATH to point to them, e.g.:
export LD_LIBRARY_PATH=/export/software/gcc-4.5.1/lib64 # note (change lib64 to lib if on a 32 bit system).
To make ld always search in a particular directory for libraries, you can modify /etc/ld.so.conf.
|
|
|
All times are GMT -5. The time now is 11:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|