我正在尝试安装 Apache Server
在我的 Ubuntu 上使用 PHP
制作的网页.
我下载了pcre
, apr
和 apr-util
我配置、制作并安装了所有这些。
然后,当我回到 Apache 文件夹时,执行以下命令
sudo ./configure --prefix=/home/test/Apache/srclib/apr-util
--with-apr=/home/test/Apache/srclib/apr
--with-pcre=/home/test/Apache/pcre
--with-included-apr
成功了。
甚至命令
sudo make
成功了。但是,当我键入 sudo make install 时,出现以下错误:
Makefile:79: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory '/home/test/Apache/srclib/apr-util'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/test/Apache/srclib'
/home/test/Apache/build/rules.mk:75: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
拜托,你能给我任何提示吗?谢谢
最佳答案
也许 apr
和 apr-util
缺少 Apache 2.4.x 所需的版本?或者,也许您只需要 -dev
包?
cd /usr/local/src/httpd-2.4.20/srclib
curl --remote-name http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
curl --remote-name http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
tar -xzvf apr-1.5.2.tar.gz
tar -xzvf apr-util-1.5.4.tar.gz
mkdir apr
mkdir apr-util
mv apr-1.5.2/ apr
mv apr-util-1.5.4/ apr-util
cd ..
然后编译
./configure --prefix=/usr/local/apache-2.4.20 --with-included-apr
好资源:http://httpd.apache.org/docs/current/install.html
以下是他们对 APR 和 APR-Util 的评价:
APR and APR-Util Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util (be sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.
关于php - 在 Ubuntu 上安装 Apache 服务器 HTTPD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46368140/