Node.js installation: openssl not installed

Posted on Feb 26, 2023

Question

I have installed libssl-dev and openssl but I get this when I install node.js:

> ./configure && make && make install                                                                                          
Checking for program g++ or c++          : /usr/bin/g++                                                                                                               
Checking for program cpp                 : /usr/bin/cpp                                                                                                               
Checking for program ar                  : /usr/bin/ar                                                                                                                
Checking for program ranlib              : /usr/bin/ranlib                                                                                                            
Checking for g++                         : ok                                                                                                                         
Checking for program gcc or cc           : /usr/bin/gcc                                                                                                               
Checking for gcc                         : ok                                                                                                                         
Checking for library dl                  : yes                                                                                                                        
Checking for openssl                     : not found                                                                                                                  
Checking for function SSL_library_init   : yes                                                                                                                        
Checking for header openssl/crypto.h     : yes                                                                                                                        
Checking for library rt                  : yes                                                                                                                        
Checking for fdatasync(2) with c++       : yes 

Openssl is not found. But node was installed successfully.

Why isn't openssl found? Anyone has the same problem?

Answer

@weng: I had the same problem. The solution was easy: sudo apt-get install pkg-config :)