linux中httpd软件包下载出错,装了一个 apache 出错,求解决

make[2]: Entering directory `/home/zfh/httpd-2.2.9/modules'

make[3]: Entering directory `/home/zfh/httpd-2.2.9/modules/aaa'

make[3]: Leaving directory `/home/zfh/httpd-2.2.9/modules/aaa'

make[3]: Entering directory `/home/zfh/httpd-2.2.9/modules/filters'

Building shared: mod_deflate.la

make[4]: Entering directory `/home/zfh/httpd-2.2.9/modules/filters'

/home/zfh/httpd-2.2.9/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread    -L/usr/local/zlib//lib      -o mod_deflate.la -rpath /usr/local/apache2/modules -module -avoid-version  mod_deflate.lo -lz

/usr/bin/ld: /usr/local/zlib//lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/local/zlib//lib/libz.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[4]: *** [mod_deflate.la] Error 1

make[4]: Leaving directory `/home/zfh/httpd-2.2.9/modules/filters'

make[3]: *** [shared-build-recursive] Error 1

make[3]: Leaving directory `/home/zfh/httpd-2.2.9/modules/filters'

make[2]: *** [shared-build-recursive] Error 1

make[2]: Leaving directory `/home/zfh/httpd-2.2.9/modules'

make[1]: *** [shared-build-recursive] Error 1

make[1]: Leaving directory `/home/zfh/httpd-2.2.9'

make: *** [all-recursive] Error 1

[root@localhost httpd-2.2.9]#

分享至:

90ed4b13fe016cebd9fe3df2ae3a899b.gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 要在Linux上安httpd软件包Apache Web服务器),请按照以下步骤进行: 1. 打开终端并以管理员身份登录。 2. 使用以下命令更新您的软件包列表: ``` sudo apt-get update ``` 3. 使用以下命令安httpd软件包: ``` sudo apt-get install apache2 ``` 4. 安过程,您可能需要输入密码以确认安。 5. 安完成后,您可以使用以下命令检查httpd是否正在运行: ``` sudo systemctl status apache2 ``` 如果httpd正在运行,您将看到“active(running)”的状态。 6. 现在,您可以通过在Web浏览器输入http://localhost来访问您的Apache服务器。 注意:如果您的Linux发行版使用不同的包管理器,请参考该发行版的文档以查找正确的命令。 ### 回答2: 要在Linux上安httpd软件包,您可以按照以下步骤进行操作: 1. 打开终端窗口并以管理员身份登录。您可以使用`su`命令加上管理员密码或者使用`sudo`命令。 2. 更新软件包列表。输入`sudo apt update`命令(Debian系列)或`sudo yum update`命令(Red Hat系列)。 3. 安httpd软件包。输入`sudo apt install apache2`命令(Debian系列)或`sudo yum install httpd`命令(Red Hat系列)。 4. 您将被要确认安过程需要下载软件包。按下y键继续。 5. 安过程将自动下载并安所需的软件包。 6. 安完成后,输入`sudo systemctl start apache2`命令(Debian系列)或`sudo systemctl start httpd`命令(Red Hat系列)启动httpd服务。 7. 输入`sudo systemctl enable apache2`命令(Debian系列)或`sudo systemctl enable httpd`(Red Hat系列)命令设置httpd服务在系统启动时自动启动。 8. 现在,您可以在浏览器输入服务器的IP地址或域名,检查httpd是否成功安。默认情况下,httpd将监听80端口。 这些步骤适用于大多数常见的Linux发行版,如Ubuntu、Debian、CentOS和Fedora等。但是,不同的发行版可能具有略微不同的命令或过程,这取决于发行版和版本。在操作系统的官方文档或社区支持下,您可以找到特定发行版的安指南。 ### 回答3: 在Linux系统httpd软件包非常简单,并且可以通过几个步骤完成。 首先,我们需要确保系统已经连接到互联网,并具备sudo权限。然后,我们可以打开终端并输入以下命令来安httpd软件包。 对于Debian和Ubuntu系统,可以使用apt包管理器来安httpd软件包。输入以下命令以更新软件包列表并安httpd软件包: sudo apt update sudo apt install apache2 对于CentOS和Fedora系统,可以使用yum包管理器来安httpd软件包。输入以下命令以更新软件包列表并安httpd软件包: sudo yum update sudo yum install httpd 安过程,系统会提示你输入管理员密码以确认安。安完成后,系统会自动启动httpd服务。你可以通过以下命令来检查httpd是否已经正确安并正在运行: sudo systemctl status httpd 如果系统显示httpd正在运行,那么恭喜你已经成功安httpd软件包。此时,你可以使用浏览器访问http://localhost来查看默认的Apache欢迎页面。 如果你想在系统启动时自动启动httpd服务,可以使用以下命令: sudo systemctl enable httpd 这样,在每次系统启动时,httpd服务都会自动启动。 总之,通过几个简单的步骤,你就可以在Linux系统httpd软件包,并开始使用Apache Web服务器来托管网站。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值