Compilation exception: /usr/bin/ld: cannot find XXX solution

Compilation exception: /usr/bin/ld: cannot find XXX solution
 
Recently installed PHP 's LAMP environment, when compiling PHP, an exception is reported:
  www.2cto.com  
configure: error:  mysql  configure failed. Please check config.log
Check config.log and find an error:
 
usr/bin/ld: cannot find -lltdl
The problem was finally solved by putting dogs online and experimenting continuously.
 
Find /usr/lib64/libltdl.so.3.1.4 and execute the following commands in this directory:
 
ln -sv libltdl.so.3.1.4 libltdl.so
The following is the information from the Internet:
 
The error usr/bin/ld: cannot find -lxxx usually occurs when the software is compiled, the main reason is that the library file is not imported into the ld retrieval directory.
  www.2cto.com  
Solution:
 
1. Confirm whether the library file exists, such as -l123, whether there is lib123.so under /usr/lib, /usr/local/lib, or other custom lib, if only lib123.so.1 exists,
 
Then you can rebuild lib123.so by establishing a connection through ln -sv lib123.so.1 lib123.so.
 
2. Check whether the library file path in /etc/ld.so.conf is correct. If the library file is not using the system path, /usr/lib, /usr/local/lib, it must be added to the file.
 
3. ldconfig rebuilds the ld.so.cache file, and the ld library file retrieval directory stores the files. Especially for the software that has just been compiled and installed, ldconfig must be run to install the newly installed software.
 
库文件导入ld.so.cache.
 
4。测试,gcc -l123 --verbose.
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326319963&siteId=291194637