[Solved] fatal error: jemalloc/jemalloc.h: No such file or directory

In the Linux system, sometimes when compiling and installing software, it will prompt: /bin/sh: cc: command not found, indicating that there is no gcc environment for compiling the code. Generally, we will install gcc first. The command is as follows:

yum -y install gcc gcc-c++

After installing gcc, continue to compile and install the original software, the error is as follows:

In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
#include <jemalloc/jemalloc.h>
^
compilation terminated.

The reason for the error is because the last compilation failed, there are residual files, we need to clean it up, and then recompile it.

Solution:

make distclean && make

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *