Friday, September 7, 2012

/usr/bin/ld: cannot find -lm

I was updating some of my software to run on CentOS6 and I had an unexpected error:
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status

The tool I was building uses -static and it turns out that static libraries are no longer shipped in glibc-devel. They are in a new package called glibc-static.

yum install glibc-static
solved the problem. My program now compiles and thanks to puppet, glibc-static is now installed on all my systems.
package { 'glibc-static': ensure => present }


  1. John: You saved me. Omg, your explore program to get at the ext-3 files on my almost dead Seagate Drive were found today. All of it! You have no idea what you did. I have over three years worth of work that I would have lost. Seriously, I have been sick about it and up all night. I cannot thank you enough. I will go back to your website and pay you if you still frequent there. Unbelievable!

  2. Took me all day to break into the Black Armor NAS 110. Was really thinking it was gone... and went to a site mentioning your explore..You made my day, sir. Tax returns, legal stuff, etc etc.

  3. I got the same problem, so did as you mentioned. But I am getting

    Setting up Install Process
    No package glibc-static available.
    Nothing to do

    can you please guide me what to do ?

  4. Thanks. I told Google search my problem, it showed me your post. A minute later, problem solved. :)

  5. The information you shared is very helpful to us.

  6. Wooow! I'm impressed with your details. Click here

  7. Dear admin really you are doing fantastic job by sharing this type of useful information with us.
    when i read your all post i think each and every post was so important so for that thank you so much and wish you all the best for upcoming post.
    visit my website:

  8. I like your post, and i visit all time on your website, this is very helpful information for any person,
    McAfee is one of the best Antivirus to keep your device safe and secure from malware and fake notifications
    You need to Install McAfee security Activate McAfee Activate Product Key

  9. As the name proposes, the subsequent translation is the antonym of the primary understanding. You just need to close down the printer and complete every one of the links from the USB port. Remove patch message 0X97 error Epson printer Like the main understanding, you need to sit tight for a couple of moments and press the force catch of the Epson printer for at any rate one to two minutes. Simultaneously, you need to plug every one of the links to its underlying position. Presently, rehash the interaction, it implies you need to hold the force catch of the Epson printer briefly after the module cycle. Delivery the Epson printer power catch and start the printer to check if Epson printer mistake code 0x97 is settled. There is a most extreme possibility that your concern has been settled and you can print your significant records. In any case, on the off chance that you are confronting a similar Epson printer mistake code 0x97 then you need to follow the third translation. Brother printer not printing