惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
有赞技术团队
有赞技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threat Research - Cisco Blogs
L
LangChain Blog
Simon Willison's Weblog
Simon Willison's Weblog
Project Zero
Project Zero
Latest news
Latest news
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
IT之家
IT之家
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
G
Google Developers Blog
T
Tor Project blog
T
Threatpost
D
DataBreaches.Net
博客园 - 【当耐特】
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cisco Blogs
博客园_首页
S
Securelist
T
The Exploit Database - CXSecurity.com
Last Week in AI
Last Week in AI
量子位
U
Unit 42
Know Your Adversary
Know Your Adversary
Hugging Face - Blog
Hugging Face - Blog
S
Security Affairs
Google Online Security Blog
Google Online Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志

博客园 - Tinywan

响应错误: Indirect modification of overloaded element of app\model\StudentCacheModel has no effect - Tinywan how to set mpdf HTML contains invalid UTF-8 character(s) 和 CPU 100% Redis Docekr WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition Nginx添加第三方模块,出现“is not binary compatible in”错误的解决方案 Docker 数据库连接见解异常 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again 解决mysql死锁问题 SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction Java系列 | 如何讲自己的JAR包上传至阿里云maven私有仓库【云效制品仓库】 Redis系列 | 分类树查询功能如何从2s优化到0.1s Docker系列 | docker endpoint for “default” not found Node系列 | Node版本管理工具 fnm Java系列 | IntelliJ IDEA 如何导入和使用一个Jar包 Chrome扩展插件:Console Importer(控制台导入器) PHP系列 | mPdf字体库异常 Cannot find TTF TrueType font file "Eeyek.ttf" in configured font directories PHP系列 | PHP中的stdClass是什么? 网络安全 | 记录一次acme.sh更新证书 Error add txt for domain:_acme-challenge.tinywan.com 大数据系列 | 阿里云datav数据可视化(使用json文件生成可视化动态图标) Docker系列 | SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again768 Java系列 | Linux系统中运行JMeter脚本 PHP系列 | TP6使用表达式设置数据 Db::raw('end_time')
Ubuntu 22.04 编译安装 PHP 7.4.33 报错:make: *** [Makefile:749: ext/openssl/openssl.lo] Error 1
Tinywan · 2024-12-30 · via 博客园 - Tinywan

下载openssl1.1.1  https://openssl-library.org/source/old/1.1.1/index.html

安装低版本OpenSSL

wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz
tar zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
./config --prefix=/usr/local/openssl --shared
make && make install

编译php时指定openssl路径

--with-openssl=/opt/build

最终编译命令

./configure --prefix=/usr/local/php-7.4 --with-config-file-path=/usr/local/php-7.4/etc --with-openssl=/opt/build --with-zlib-dir --with-freetype --enable-mbstring --enable-soap --enable-calendar --with-curl --with-zlib --enable-gd  --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --with-zip --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg --with-openssl --with-fpm-user=www --with-fpm-group=www --with-libdir=/lib/x86_64-linux-gnu --enable-ftp  --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-intl --with-pear --enable-fpm

 编译安装

make install
Installing shared extensions:     /usr/local/php-7.4/lib/php/extensions/no-debug-non-zts-20190902/
Installing PHP CLI binary:        /usr/local/php-7.4/bin/
Installing PHP CLI man page:      /usr/local/php-7.4/php/man/man1/
Installing PHP FPM binary:        /usr/local/php-7.4/sbin/
Installing PHP FPM defconfig:     /usr/local/php-7.4/etc/
Installing PHP FPM man page:      /usr/local/php-7.4/php/man/man8/
Installing PHP FPM status page:   /usr/local/php-7.4/php/php/fpm/
Installing phpdbg binary:         /usr/local/php-7.4/bin/
Installing phpdbg man page:       /usr/local/php-7.4/php/man/man1/
Installing PHP CGI binary:        /usr/local/php-7.4/bin/
Installing PHP CGI man page:      /usr/local/php-7.4/php/man/man1/
Installing build environment:     /usr/local/php-7.4/lib/php/build/
Installing header files:          /usr/local/php-7.4/include/php/
Installing helper programs:       /usr/local/php-7.4/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php-7.4/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php-7.4/lib/php/
[PEAR] Archive_Tar    - installed: 1.4.14
[PEAR] Console_Getopt - installed: 1.4.3
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.5
warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.14 is not the recommended version 1.4.4
[PEAR] PEAR           - installed: 1.10.13
Wrote PEAR system config file at: /usr/local/php-7.4/etc/pear.conf
You may want to add: /usr/local/php-7.4/lib/php to your php.ini include_path
/opt/php-7.4.32/build/shtool install -c ext/phar/phar.phar /usr/local/php-7.4/bin/phar.phar
ln -s -f phar.phar /usr/local/php-7.4/bin/phar
Installing PDO headers:           /usr/local/php-7.4/include/php/ext/pdo/

 systemctl status php-7.4-fpm.service 启动异常

Dec 30 21:27:57 iZbp167tleyjg1lr7zw9qvZ systemd[1]: Started The PHP 7.4 FastCGI Process Manager.
Dec 30 21:27:57 iZbp167tleyjg1lr7zw9qvZ php-fpm[408017]: /usr/local/php-7.4/sbin/php-fpm: error while loading shared libraries: libssl.so.1.1: cannot open shar>
Dec 30 21:27:57 iZbp167tleyjg1lr7zw9qvZ systemd[1]: php-7.4-fpm.service: Main process exited, code=exited, status=127/n/a
Dec 30 21:27:57 iZbp167tleyjg1lr7zw9qvZ systemd[1]: php-7.4-fpm.service: Failed with result 'exit-code'.

用命令查询需要的链接库

sudo find / -name libssl.so.1.1
/snap/core20/2434/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/snap/core20/1405/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/usr/lib64/libssl.so.1.1
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/opt/build/lib/libssl.so.1.1
/opt/openssl-1.1.1w/libssl.so.1.1

创建软连接【ln -s 源文件 目标文件】

ln -s /opt/openssl-1.1.1w/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.1
ln -s /opt/openssl-1.1.1w/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1