Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to compile a script with GCC on my Ubuntu system and get this error:

 /usr/bin/ld: cannot find -lgcc_s 

How can I fix this problem?

share|improve this question
add comment

1 Answer

Check whether gcc is properly installed. If not install using the command

sudo apt-get install gcc-x.x

replace x.x with the proper version.

If gcc is installed properly then the issue might be with the link. Check whether lgcc_s is properly linked.

libgcc files are located under /usr/lib/gcc/i686-linux-gnu/x.x

share|improve this answer
    
i have 4.6 and 4.6.1 –  Shan Nov 21 '12 at 19:08
    
check in 4.6.1 directory –  devav2 Nov 21 '12 at 19:09
    
it has libgcc_s.so –  Shan Nov 21 '12 at 19:10
    
do i have to do something like symlink from "/ lib/libgcc.so.1" to "/ lib / libgcc.so –  Shan Nov 21 '12 at 19:11
    
its in one of the post over the internet –  Shan Nov 21 '12 at 19:12
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.