VPS侦探论坛

 找回密码
 注册
查看: 3626|回复: 1

安装扩展sodium太难了

[复制链接]
发表于 2021-6-7 13:57:11 | 显示全部楼层 |阅读模式

centos 8
lnmp安装的php 8.0.6,安装sodium扩展不成功

[root@localhost sodium]# yum install libsodium-devel
上次元数据过期检查:1:25:21 前,执行于 2021年06月07日 星期一 12时30分33秒。
未找到匹配的参数: libsodium-devel
错误:没有任何匹配: libsodium-devel
[root@localhost sodium]#

下载了full包解压了php,安装还是失败

[root@localhost ext]# cd sodium
[root@localhost sodium]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
[root@localhost sodium]# ./configure --with-php-config=/usr/local/php/bin/php-co                                         nfig --with-kerberos --with-imap-ssl
configure: WARNING: unrecognized options: --with-kerberos, --with-imap-ssl
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/inclu                                         de/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend                                          -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-deb                                         ug-non-zts-20200930
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking for sodium support... yes, shared
checking for libsodium >= 1.0.8... no
configure: error: Package requirements (libsodium >= 1.0.8) were not met:

Package 'libsodium', required by 'virtual:world', not 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.
[root@localhost sodium]# make && make install
make: *** 没有指明目标并且找不到 makefile。 停止。
[root@localhost sodium]#


美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-6-7 14:31:34 | 显示全部楼层


yum install epel-release    # 安装epel可以了

yum install libsodium-devel #安装依赖包libsodium
tar -jxvf /root/lnmp1.8/src/php-8.0.6.tar.bz2 #解压,在/root/php-8.0.6/
cd /root/php-8.0.6/ext/sodium
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-24 08:05 , Processed in 0.026096 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表