IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> PHP知识库 -> PHP Warning: PHP Startup: Unable to load dynamic library ‘bz2‘ (tried: /usr/local/php8/lib/php/exte -> 正文阅读

[PHP知识库]PHP Warning: PHP Startup: Unable to load dynamic library ‘bz2‘ (tried: /usr/local/php8/lib/php/exte

PHP安装,创建完软连接,第一次使用 php -m查看扩展正常

在这里插入图片描述
但是在调用软连接:php -v 或者 php -m 会出现以下错误

PHP Warning:  PHP Startup: Unable to load dynamic library 'bz2' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/bz2 (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/bz2: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/bz2.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/bz2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'calendar' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/calendar (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/calendar: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/calendar.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/calendar.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ctype' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ctype (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ctype: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ctype.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ctype.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/curl (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/curl: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/curl.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dom' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/dom (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/dom: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/dom.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/dom.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'exif' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/exif (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/exif: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/exif.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/exif.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/fileinfo (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/fileinfo: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/fileinfo.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ftp' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ftp (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ftp: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ftp.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/ftp.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'gettext' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/gettext (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/gettext: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/gettext.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/gettext.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'iconv' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/iconv (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/iconv: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/iconv.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/iconv.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/phar (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/phar: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/phar.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/phar.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'posix' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/posix (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/posix: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/posix.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/posix.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'shmop' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/shmop (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/shmop: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/shmop.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/shmop.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/simplexml (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/simplexml: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/simplexml.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/simplexml.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sockets' (tried: /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/sockets (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/sockets: cannot open shared object file: No such file or directory), /usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/sockets.so (/usr/local/php8/lib/php/extensions/no-debug-non-zts-20210902/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

每次处理这个问题都要浪费好长时间(在遇到3次以上后,我终于决定,把方法记录下来)
找到自己的编译配置
在这里插入图片描述
我的是 /etc/php.d会看到对应的*.ini文件
在这里插入图片描述
进入后看到

; Enable bz2 extension module
extension=bz2

变更为

; Enable bz2 extension module
;extension=bz2

即可。
记得每个ini的文件中的extension前都要加“;”号

也许你遇到的问题与我的不一样,请找其它解决方法

为了下次不再想好久,好烦

  PHP知识库 最新文章
Laravel 下实现 Google 2fa 验证
UUCTF WP
DASCTF10月 web
XAMPP任意命令执行提升权限漏洞(CVE-2020-
[GYCTF2020]Easyphp
iwebsec靶场 代码执行关卡通关笔记
多个线程同步执行,多个线程依次执行,多个
php 没事记录下常用方法 (TP5.1)
php之jwt
2021-09-18
上一篇文章      下一篇文章      查看所有文章
加:2022-01-08 13:45:21  更:2022-01-08 13:46:44 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/14 14:32:18-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码