This is a test version of Biostars. For the public version, visit https://www.biostars.org.
kmergenie - Error 1 - It is doesnt work when I typed 'make'

Good morning.

I am trying to use kmergenie v1.6972. But it is broken when I typed "make"

sudo make
g++ -o minia/Pool.o -c minia/Pool.cpp -O4 -pthread  -D_largeint -DKMER_PRECISION=4
make: g++: Command not found
make: *** [minia/Pool.o] Error 127

Firstly I install g++ like the next user told me. But it appears new errors. I have r-base, Rscript installed.

I show the error with make, make check and ./kmergenie

make
g++ -o minia/Pool.o -c minia/Pool.cpp -O4 -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Bank.o -c minia/Bank.cpp -O4 -pthread  -D_largeint -DKMER_PRECISION=4
In file included from minia/Bank.cpp:21:0:
minia/Bank.h:13:63: fatal error: zlib.h: No such file or directory
 #include <zlib.h> // Added by Pierre Peterlongo on 02/08/2012.
                                                               ^
compilation terminated.
make: *** [minia/Bank.o] Error 1
./kmergenie /home/zhu/File.fq
running histogram estimation
Execution of specialk failed: [Errno 2] No such file or directory
fitting model to histograms to estimate best k
could not predict a best k value
Execution of decide failed (return code 0). If this is a fresh Kmergenie install, try running 'make check'.
make check
g++ -o minia/Bank.o -c minia/Bank.cpp -O4 -pthread  -D_largeint -DKMER_PRECISION=4
In file included from minia/Bank.cpp:21:0:
minia/Bank.h:13:63: fatal error: zlib.h: No such file or directory
 #include <zlib.h> // Added by Pierre Peterlongo on 02/08/2012.
                                                               ^
compilation terminated.
make: *** [minia/Bank.o] Error 1

Regards

kmergenie

2 answers

sudo apt-get install g++

Whenever you see an error such as

XXX.h: No such file or directory

the solution is to search for and install a package usually (but not always) named something like XXX-dev.

So in this case

apt-cache search zlib dev
sudo apt-get install zlib1g-dev

It is always worth doing a Google search with errors like these; they are common and many people will have posted solutions to them.

Thanks. I dont know the option apt-cache. Regards.

Please accept the solutions that worked for you, so the question is automatically marked as solved by the system.

It worked. I accepted. I accept. I edited the title of post.

Under each answer that worked, please click on the check mark. That is how you mark questions as solved, not by editing the title.

Log in to answer this question.