Arch Linux:Yaourt/Makepkg 无法构建 Apache

Arch Linux:Yaourt/Makepkg 无法构建 Apache

每次有可用更新时,我都会使用 yaourt 从源代码自动编译 Apache extra。我这样做是为了可以拥有自定义的 suexec docroot (/srv/www而不是默认的/srv/http)。到目前为止,这已经在多次更新中完美运行。

$ yaourt -S apache
==> Building apache from sources.

==> Retrieving PKGBUILD and local sources...
receiving file list ... done
./
PKGBUILD
apache.conf.d
apache.install
apache.tmpfiles.conf
apachectl-confd.patch
arch.layout
httpd
httpd.logrotate
pcre_info.patch

sent 199 bytes  received 10416 bytes  7076.67 bytes/sec
total size is 9809  speedup is 0.92
=> removes/replaces '--with-suexec-docroot=\/srv\/http' by '--with-suexec-docroot=\/srv\/www' in global
--- ./PKGBUILD  2012-07-06 00:02:13.000000000 -0400
+++ ./PKGBUILD.custom   2012-07-06 15:49:03.000000000 -0400
@@ -102,7 +102,7 @@
            --enable-so \
            --enable-suexec \
            --with-suexec-caller=http \
-           --with-suexec-docroot=/srv/http \
+           --with-suexec-docroot=/srv/www \
            --with-suexec-logfile=/var/log/httpd/suexec.log \
            --with-suexec-bin=/usr/sbin/suexec \
            --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
==> Edit PKGBUILD ? [y/N] ("A" to abort)
==> ------------------------------------
==> n

==> apache dependencies:
 - openssl (already installed)
 - zlib (already installed)
 - apr-util (already installed)
 - pcre (already installed)


==> Edit apache.install ? [y/N] ("A" to abort)
==> ------------------------------------------
==> n

==> Continue building apache ? [Y/n]
==> --------------------------------
==> 
==> Building and installing package
==> Making package: apache 2.2.22-4 (Thu Jul  5 14:47:33 EDT 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Downloading httpd-2.2.22.tar.bz2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5252k  100 5252k    0     0  93231      0  0:00:57  0:00:57 --:--:-- 93283
  -> Downloading httpd-2.2.22.tar.bz2.asc...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   835  100   835    0     0   5191      0 --:--:-- --:--:-- --:--:-- 10437
  -> Downloading 02-rename-prefork-to-itk.patch...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:06 --:--:--     0curl: (7)     couldn't connect to host
==> ERROR: Failure while downloading 02-rename-prefork-to-itk.patch
    Aborting...
==> ERROR: Makepkg was unable to build apache.
==> Restart building apache ? [y/N]
==> -------------------------------
==> 

问题似乎是curl找不到02-rename-prefork-to-itk.patch.我不知道它位于哪个 URL、在哪个文件中指定,或者如何找到它的备用位置。知道发生了什么/如何排除故障吗?

答案1

curl: (7)     couldn't connect to host

根据 curl,它无法连接到主机。这可能有很多原因,例如文件不在服务器上。我的建议是稍后再试,如果不行,则联系正在下载文件的主机。

答案2

部分补丁所在主机宕机。但我们可以把它改成另一种。

第一的。只需使用 yaourt 下载 PKGBUILD:

yaourt -G apache

在 PKGBUILD 中更改以下行:

_itkurl=http://mpm-itk.sesse.net/apache2.2-mpm-itk-2.2.17-01

到:

_itkurl=http://distfiles.alpinelinux.org/distfiles/

另外,补丁 03-add-mpm-to-build-system.patch 有不同的 md5,所以我们修复它。只需更改数组“md5sums”中的第四行

'cdfa04985a0efa850976aef01c2a0c40'

到:

'131408ad4dc7b18547b4e062e7e495ab'

可用的 PKGBUILD 如下:http://pastebin.com/iK48xx8f

如果你愿意的话,你可以直接更换它。并使用以下命令构建 apache:

makepkg -i

答案3

apache等等,你为什么要尝试从 AUR下载源代码?apache肯定是用Arch打包的。

pierre@bar code % pacman -Si apache
Repository     : extra
Name           : apache
Version        : 2.2.22-4
[...]

验证您是否拥有/etc/pacman.conf

[extra]
Include = /etc/pacman.d/mirrorlist

并且至少有一些未注释的镜像/etc/pacman.d/mirrorlist,那么:

# pacman -Sy apache

它应该安装得很好。

答案4

因此,我不确定这是否是由于我最近的完整系统升级,或者 URL 独立恢复所致,但稍后重试似乎消除了此特定错误。但是,我仍然无法构建 Apache,因为我现在遇到了一个新错误,但这是一个单独发行

相关内容