Home >Backend Development >PHP Tutorial >How to find out which libraries a certain software such as php-fpm depends on?

How to find out which libraries a certain software such as php-fpm depends on?

WBOY
WBOYOriginal
2016-08-10 09:07:151514browse

Most of them can be found through ldd, but some others are unknown.

Reply content:

Most of them can be found through ldd, but some others are unknown.

ldd php-fpm is to view the shared libraries that static binary files depend on.
You can use sudo lsof -p PID to view the files opened when the program is running, including dependent shared libraries.
It should be noted that some do not PHP extensions compiled into PHP-FPM (also so files) sometimes depend on other libraries, so you have to find out which libraries PHP-FPM depends on. It is best to load all the PECL extensions you use and run them with lsof to view.
If you want to package a PHP binary package that can be decompressed and used across Linux, you can read this article of mine.
The Android version of PHP I compiled by myself is completely statically linked with dependent libraries.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn