Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
老是报Cannot find zlib 这个错,求大大帮助!
Apps Section
1569
views ·
3
replies ·
To
floor
Go
wanghaijun_1990
deepin
2019-08-01 03:18
Author
checking if the location of ZLIB install directory is defined...
已经做了下面这些操作
1.情况说明:在用源码安装php5,在编译的时候出现错误:checking if the location of ZLIB install directory is defined... no ; configure: error: Cannot find libz.
2.这是由于我们没有安装zlib导致的,只要到官网中下载和编译安装即可:
(1) http://www.zlib.net/ 下载zlib源码。这里下载版本zlib-1.2.7.tar.gz,解压到/usr/src,执行命令#tar -zxvf zlib-1.2.7.tar.gz -C /usr/src
(2)进入目录/usr/src/zlib-1.2.7/,执行命令:
# ./configure --prefix=/usr/local/zlib
#make && make install
(3)进入到php目录中重新编译,如果没有参数zlib可以增加参数:
--with-zlib-dir=/usr/local/zlib
但是依然还是报错!
求助!
Reply
Like 0
Favorite
View the author
All Replies
aida
deepin
2019-08-01 18:53
#1
注意一下编译的架构
zlib的安装位置
Cannot find zlib 就是没找到zlib,可能版本不对应?》
Reply
Like 0
View the author
wanghaijun_1990
deepin
2019-08-01 19:13
#2
15.11的应该安装什么版本啊
Reply
Like 0
View the author
duanyao
deepin
2019-08-01 19:42
#3
本帖最后由 duanyao 于 2019-8-1 11:46 编辑
从源码编译软件时,prefix 一般应该写 /usr 或 /usr/local ,或者不写(一般默认 /usr/local )。
不要写成其它的,除非你很了解这个软件的构建系统。
另外,也可以直接从仓库安装 zlib 开发包:sudo apt install zlib1g-dev
Reply
Like 0
View the author
Comments
wanghaijun_1990
2019-08-01 21:53
完美解决,谢谢大大
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
What is the purpose of UOS AI?
Cannot upgrade "Deepin 25.0.10"
Experience
Feature Request: Adding an option for a "Floating Dock" mode in DDE
[Feature Request] Drop-down grid panel for window snap layouts
Popular Events
More
已经做了下面这些操作