升级php7.4遇到的问题

2020年6月2日
分类:

经过一轮的google和百度,最后还是安装php7.4失败。其他的1G内存的VPS倒是可以,反而2G的VPS失败。无语了。

但是真心不建议1G内存的VPS使用PHP7.4,内存会很紧张,而且真的很卡,一不小心,数据库还直接挂起。

checking for libsodium >= 1.0.8… no
configure: error: Package requirements (libsodium >= 1.0.8) were not met:

No package 'libsodium' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSODIUM_CFLAGS
and LIBSODIUM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.

1、下载并解压

wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz
tar -zxf libsodium-1.0.18-stable.tar.gz
cd libsodium-stable

wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar -zxf LATEST.tar.gz
cd libsodium-stable

2、编译安装

./configure --prefix=/usr
make && make check
sudo make install
sudo ldconfig

写在最后,更新PHP7.4,主题不一定会兼容,而且很吃内存,建议2G内存才使用PHP7.4。

本文标签:
Copyright © 唛鬼