4

Ubuntu18.04.5版本LTS安装php7.4报错

 2 years ago
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.
neoserver,ios ssh client

Ubuntu18.04.5版本LTS安装php7.4报错

青山 2022-01-1309:54:23评论1068字

今天想给我的阿里云服务器(Ubuntu18.04)安装一个php7.4,由于安装了宝塔面板,所以应该一键安装完成的,但是安装的时候却报错了,报错如下:

Ubuntu18.04.5版本LTS安装php7.4报错

这是怎么回事呢? 可以看到有一句:

  1. No package 'sqlite3' found

所以可以直接安装sqlite3:

  1. apt-get install sqlite3

于是我又开始安装php7.4,再次报错:

  1. checking for RAND_egd... no
  2. checking for openssl >= 1.0.1... no
  3. configure: error: Package requirements (openssl >= 1.0.1) were not met:
  4. No package 'openssl' found
  5. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  6. installed software in a non-standard prefix.
  7. Alternatively, you may set the environment variables OPENSSL_CFLAGS
  8. and OPENSSL_LIBS to avoid the need to call pkg-config.
  9. See the pkg-config man page for more details.
  10. make: *** No targets specified and no makefile found. Stop.
  11. make: *** No rule to make target 'install'. Stop.
  12. ========================================================
  13. Ubuntu 18.04.5 LTS
  14. Bit:64 Mem:1993M Core:1 gcc:7.5.0 cmake:3.10.2
  15. Linux 4.15.0-65-generic x86_64
  16. ERROR: php-7.4.19 install failed.
  17. 安装失败,请截图以上报错信息发帖至论坛www.bt.cn/bbs求助

又是报错:

  1. No package 'openssl' found

那么就安装吧:

  1. apt-get install libssl-dev

最后安装完成:

  1. Build complete.
  2. Don't forget to run 'make test'.
  3. Installing shared extensions: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/
  4. Starting php-fpm done

Ubuntu18.04.5版本LTS安装php7.4报错Ubuntu18.04.5版本LTS安装php7.4报错


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK