How to solve problems encountered during PHP7.2.3 installation

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

This article mainly shares with you how to solve problems encountered during PHP7.2.3 installation. Iffileinfois enabled during compilation and installation, the memory must be greater than 1G, and PHP is installed by default. Since I disabled--disable-fileinfowhen 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 aninternal compiler error: Killed (program cc1plus)error occurs when addingfileinfo, 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 executingexec, install, and update, third-party libraries are allowed to execute in your system. They are"plugins" and "scripts"in third-party libraries, andPlugins and scriptswill have corresponding user permissions to execute composer. For security reasons, avoid usingsuperuser Or rootpermissions.

The official solution is as follows (third-party scripts and plug-ins will not be allowed if you add the following parameters)

composer install --no-plugins --no-scripts ...
composer update --no-plugins --no-scripts ...

If enabled during compilation and installationfileinfoThe 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!