nginx install error:checking for --with-ld-opt="-ljemalloc" ... not found

created at 03-31-2022 views: 80

problem

Recently, when deploying a new centos7 server environment, I found that the nginx installation reported an error.

details as follows:

checking for gcc -pipe switch ... found
checking for --with-ld-opt="-ljemalloc" ... not found
./configure: error: the invalid value in --with-ld-opt="-ljemalloc"

make: *** No rule to make target `build', needed by `default'.  Stop.
Nginx install failed, Please Contact the author! 
already killed

Carefully read the prompt and found that jemalloc was missing, so I looked for an installation method online. Tried the following command:

wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2

but got error

Connecting to www.canonware.com (www.canonware.com)|204.109.63.53|:80... Failed: Connection timed out.
Retrying.

solution

I have no choice but to continue to find the answer. I can go directly to other places to download the resources and then upload and install them. Inadvertently, I found the answer hint:

yum install jemalloc

Run the installation directly, or the 3.6 version, rejoice, OK.

created at:03-31-2022
edited at: 03-31-2022: