Home  >  Article  >  Backend Development  >  What to do if php7.2 fails to run

What to do if php7.2 fails to run

藏色散人
藏色散人Original
2021-12-09 09:55:382603browse

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.

What to do if php7.2 fails to run

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!

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