Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 – Shan Nov 21 '12 at 19:10
do i have to do something like symlink from "/ lib/" to "/ lib / – Shan Nov 21 '12 at 19:11
its in one of the post over the internet – Shan Nov 21 '12 at 19:12

Your Answer


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.