Home > Backend Development > PHP Tutorial > How to solve problems encountered during PHP7.2.3 installation

How to solve problems encountered during PHP7.2.3 installation

小云云
Release: 2023-03-22 16:12:02
Original
3665 people have browsed it

This article mainly shares with you how to solve problems encountered during PHP7.2.3 installation. If fileinfo is enabled during compilation and installation, the memory must be greater than 1G, and PHP is installed by default. Since I disabled --disable-fileinfo when compiling, but if I use it in the project, I can install it directly as a module without recompiling and installing the entire PHP.

If an internal compiler error: Killed (program cc1plus) error occurs when adding fileinfo, it is caused by insufficient memory. Temporarily use a swap partition to solve it.

sudo dd if=/dev/zero of=/swapfile bs=64M count=16sudo mkswap /swapfilesudo swapon /swapfile#编译完后释放临时空间Code:sudo swapoff /swapfilesudo rm /swapfile
Copy after login

Appears during the installation project

[root@iZwz99qnmldt4n744noo9gZ biyesheji]# composer installDo not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
....
Copy after login

In other words, when executing exec, install, and update, third-party libraries are allowed to execute in your system. They are "plugins" and "scripts" in third-party libraries, and Plugins and scripts will have corresponding user permissions to execute composer. For security reasons, avoid using superuser Or root permissions.

The official solution is as follows (third-party scripts and plug-ins will not be allowed if you add the following parameters)
<br> composer install --no-plugins --no-scripts ... <br> composer update --no-plugins --no-scripts ...

If enabled during compilation and installationfileinfo The memory must be greater than 1G, PHP is installed by default

The above is the detailed content of How to solve problems encountered during PHP7.2.3 installation. 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