4
Ubuntu18.04.5版本LTS安装php7.4报错
source link: https://www.huhexian.com/22907.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Ubuntu18.04.5版本LTS安装php7.4报错
2022-01-1309:54:23评论1068字
今天想给我的阿里云服务器(Ubuntu18.04)安装一个php7.4,由于安装了宝塔面板,所以应该一键安装完成的,但是安装的时候却报错了,报错如下:
这是怎么回事呢? 可以看到有一句:
- No package 'sqlite3' found
所以可以直接安装sqlite3:
- apt-get install sqlite3
于是我又开始安装php7.4,再次报错:
- checking for RAND_egd... no
- checking for openssl >= 1.0.1... no
- configure: error: Package requirements (openssl >= 1.0.1) were not met:
- No package 'openssl' 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 OPENSSL_CFLAGS
- and OPENSSL_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.
- ========================================================
- Ubuntu 18.04.5 LTS
- Bit:64 Mem:1993M Core:1 gcc:7.5.0 cmake:3.10.2
- Linux 4.15.0-65-generic x86_64
- ERROR: php-7.4.19 install failed.
- 安装失败,请截图以上报错信息发帖至论坛www.bt.cn/bbs求助
又是报错:
- No package 'openssl' found
那么就安装吧:
- apt-get install libssl-dev
最后安装完成:
- Build complete.
- Don't forget to run 'make test'.
- Installing shared extensions: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/
- Starting php-fpm done
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK