Saturday, July 6, 2013

Resolving cannot find -lm and -lz error on CentOS 6

While installing lblasr ( https://github.com/PacificBiosciences/blasr

I have this errors below.

g++ -O3 -Wno-div-by-zero -I ../common -I ../../seymour/dist/common/include bin/WordCounter.o -static -o bin/wordCounter
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status

g++ -static -O3 -Wno-div-by-zero -I ..//common -I ../../seymour/dist/common/include bin/SuffixArrayToBWT.o -o bin/sa2bwt -L../../seymour/dist/common/lib/ -lz -lpthread
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status

To solve the errors -lm on CentOS 6,  make sure you install 3 packages
# yum install glibc glibc-devel glibc-static

To solve the errors -lz on CentOS 6, make sure you install 3 packages from

 # yum install zlib zlib-devel zlib-static

No comments: