在 Linux 服务器上安装 ZLIB
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9979870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing ZLIB in Linux Server
提问by alessandro
I want to install ZLIBin the Linux server. My server account is: /home/myname . I download and extract ZLIB on my account properly. Then, I enter to ZLIB1.2.6 folder and run the command:
我想在 Linux 服务器中安装ZLIB。我的服务器帐户是: /home/myname 。我在我的帐户中正确下载并提取了 ZLIB。然后,我进入 ZLIB1.2.6 文件夹并运行命令:
./configure --prefix=/home/myname/zlib
./configure --prefix=/home/myname/zlib
But, it gives error:
但是,它给出了错误:
-bash: ./configure: Permission denied
-bash: ./configure: 权限被拒绝
Can anybody help me why is this happening ?
任何人都可以帮助我为什么会发生这种情况?
采纳答案by Victor Ni?u
Ok, if you are using Debian, you should do:
好的,如果您使用的是 Debian,您应该这样做:
su
to become root
成为根
apt-get update
to refresh the package lists, then
刷新包列表,然后
apt-cache search zlib
to check the relevant packages in the lists you have just updated, then
检查您刚刚更新的列表中的相关包,然后
apt-get install <whatever_package_you_found_earlier>
I suggest using regular expression as search strings for apt-cache, since they are more accurate, as in
我建议使用正则表达式作为 apt-cache 的搜索字符串,因为它们更准确,如
apt-cache search ^zlib
to return only package names startingwith zlib
只返回以 zlib开头的包名
回答by Drizzt321
As Ignacio wrote above, just install the package for your particular distribution unless there is a very, very specific reason why you need that particular version of zlib.
正如 Ignacio 上面写的那样,除非有非常非常具体的原因为什么您需要该特定版本的 zlib,否则只需为您的特定发行版安装软件包。
回答by ansar313
sudo apt-get install libgcrypt11-dev zlib1g-dev