Home>Article>Backend Development> What to do if php7.2 fails to run
Solution to the failure of php7.2: 1. Execute "vi Makefile" in the PHP source directory; 2. Find the EXTRA_LIBS line; 3. Add "-llber" at the end of the line; 4. Save and exit and try again Just make.
The operating environment of this article: Windows 7 system, PHP version 7.2, Dell G3 computer.
What should I do if php7.2 fails to run?
php7.2 pitfalls encountered during compilation
checking size of long int... (cached) 8 configure: error: Cannot find ldap libraries in /usr/lib.
Solution:
./configure php occurred when the following error occurred and exited
configure: error: Cannot find ldap libraries in /usr/lib
Solution:
cp -frp /usr/lib64/libldap* /usr/lib/
Then ./configure...
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup' //usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
Solution: When encountering this similar situation, it means that "./configure" did not take care of some environment changes. numerical value.
Solution, an article from a foreigner:
Find the EXTRA_LIBS line in vi Makefile in the PHP source directory, add '-llber' at the end of the line, save and exit, and make again
/usr/local/src/php-7.2.7/sapi/cli/php: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory make: *** [ext/phar/phar.php] Error 127
Solution:
1. First
#vi /etc/ld.so.conf
Add a line /usr/local/lib
2. Then run /sbin/ldconfig
#/sbin/ldconfig
Compile make
Generating phar.phar chmod: cannot access ‘ext/phar/phar.phar’: No such file or directory make: [ext/phar/phar.phar] Error 1 (ignored)
Solution:
cd ext/phar/ cp ./phar.php ./phar.phar
Recommended study: "PHP Video Tutorial"
The above is the detailed content of What to do if php7.2 fails to run. For more information, please follow other related articles on the PHP Chinese website!