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

What to do if php7.2 fails to run

藏色散人
Release: 2023-02-18 09:26:01
Original
2721 people have browsed it

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.
Copy after login

Solution:

./configure php occurred when the following error occurred and exited

configure: error: Cannot find ldap libraries in /usr/lib
Copy after login

Solution:

cp -frp /usr/lib64/libldap* /usr/lib/
Copy after login

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
Copy after login

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
Copy after login

Solution:

1. First

#vi /etc/ld.so.conf
Copy after login

Add a line /usr/local/lib

2. Then run /sbin/ldconfig

 #/sbin/ldconfig
Copy after login

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)
Copy after login

Solution:

cd ext/phar/
cp ./phar.php ./phar.phar
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template