提问者:小点点

icu4c-使用Homebrew安装优胜美地后更新/安装php


我刚刚升级到优胜美地。我使用的是Apache 2.2,但升级包括2.4。在经历了一些配置噩梦之后,我最终使用Homebrew重新安装了2.4。我有它大部分配置。但是,当我使用PHP的旧httpd.conf设置时,我得到以下错误:

未找到符号:_unixd_config\n引用自:/usr/local/opt/php55/libexec/apache2/libphp5。因此\n应在:/usr/local/ceral/httpd24/2.4中使用。10/bin/httpd\n在/usr/local/opt/php55/libexec/apache2/libphp5中。所以

运行brew upgrade php55时,更新icu4c时出现以下错误:

==> Upgrading icu4c
==> Downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/icu4c-54.1.tgz
Error: SHA1 mismatch
Expected: 8c752490bbf31cea26e20246430cee67d48abe34
Actual: d625398a0d5cb34a0b5b2c4ab577e3b1957fb460
Archive: /Library/Caches/Homebrew/icu4c-54.1.tgz
To retry an incomplete download, remove the file above.

删除文件没有帮助。我已经运行了brew医生,这给了我这个关于php:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

    /usr/local/opt/php55/bin/php-config

不确定如何继续。我尝试安装php56,但它需要相同的依赖性。似乎是icu4c的问题,但这对我来说是一个未知的领域。谢啦


共1个答案

匿名用户

此错误与您安装的Xcode或GCC、LLVM或Clang的版本无关。如果您查看有问题的文件,您可以看到发生了什么。

[uxp@localhost]% brew install icu4c
==> Downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
######################################################################## 100.0%
Error: SHA1 mismatch
Expected: 8c752490bbf31cea26e20246430cee67d48abe34
Actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b
Archive: /Library/Caches/Homebrew/icu4c-54.1.tgz
To retry an incomplete download, remove the file above.

[uxp@localhost]% file /Library/Caches/Homebrew/icu4c-54.1.tgz
/Library/Caches/Homebrew/icu4c-54.1.tgz: HTML document text

[uxp@localhost]% cat /Library/Caches/Homebrew/icu4c-54.1.tgz
<html><head>
<title>Testing</title>
<!-- <script src="/js/jquery.com/jquery-1.11.0.min.js"></script> -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//sourceforge.net/js/mirrors.js"></script>
<script src="/js/sf.js"></script>
<script>
var DR_loc = DR_parse_hash_url();
if (DR_loc) {
    DR_sf_main(DR_loc);
} else {
    window.location.href = 'http://sourceforge.net/home.html';
}
</script>
</head><body>
<noscript>
We're sorry -- the Sourceforge site is currently in Disaster Recovery mode, and currently requires
the use of javascript to function.  Please check back later.
</noscript>
</body></html>

因此,服务器出了问题,而不是您的机器。最简单的方法是联系他们,让他们处理(这是SourceForge的事情),但这并不能帮助您安装任何需要依赖ICU的东西。环顾互联网,我们正在寻找的tar存档的镜像站点上有一些副本,因此只需手动下载并移动到您的自制缓存目录就足够了。

[uxp@localhost]% curl http://dbg.download.sourcemage.org/mirror/icu4c-54_1-src.tgz -o /Library/Caches/Homebrew/icu4c-54.1.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24.3M  100 24.3M    0     0  3669k      0  0:00:06  0:00:06 --:--:-- 5745k

[uxp@localhost]% brew install icu4c
==> Downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/icu4c-54.1.tgz
==> ./configure --prefix=/usr/local/Cellar/icu4c/54.1 --disable-samples --disable-tests --enable-static --with-library-bits=64
==> make
==> make install
==> Caveats
...
==> Summary
/usr/local/Cellar/icu4c/54.1: 242 files, 65M, built in 74 seconds

老实说,我不知道这是否能解决Apache和PHP的问题。如果您仍然对内置的httpd和php有问题,我将删除您通过自制安装的所有版本,包括它们在/usr/local/etc中的配置文件,升级icu4c,然后系统地开始Apache、php5的安装过程。x、 然后再添加您需要的任何php5x-*模块。

我在尝试重新安装CouchDB时遇到了相同的自制失败,这与您最初的版本完全不同。