icu4c - 使用Homebrew安装Yosemite后更新/安装php

我刚升级到Yosemite。 我使用的是Apache 2.2,但升级包括2.4。 在一些配置噩梦之后,我最终使用Homebrew重新安装2.4。 我主要配置它。 但是,当我使用旧的httpd.conf设置为php时,我收到以下错误:</ p>


找不到符号:_unixd_config
引用自:/ usr / local /opt/php55/libexec/apache2/libphp5.so
预期在/ usr / local / opt / php55 / libexec / apache2 / libphp5中的/usr/local/Cellar/httpd24/2.4.10/bin/httpd
.so </ p>
</ blockquote>

运行 brew upgrade php55 </ code>时,我在更新icu4c时遇到以下错误:</ p>

 <代码> ==&GT; 升级icu4c 
==&gt; 正在下载http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
已经下载:/ Library/Caches/Homebrew/icu4c-54.1.tgz
Error:SHA1不匹配
预计: 8c752490bbf31cea26e20246430cee67d48abe34
Actual:d625398a0d5cb34a0b5b2c4ab577e3b1957fb460
Archive:/Library/Caches/Homebrew/icu4c-54.1.tgz
要重试不完整的下载,请删除上面的文件。
</ code> </ pre>

删除 该文件没有帮助。 我运行了 brew doctor </ code>,这给了我关于php的信息:</ p>

 警告:“config”脚本存在于你的系统或Homebrew目录之外。  n./ configure脚本经常查找* -config脚本以确定是否安装了
software软件包,以及在编译和链接时使用的其他标志。

在您的路径中添加其他脚本可能会混淆通过\安装的软件 nHomebrew如果配置脚本覆盖系统或Homebrew提供的同名的
script。 我们找到了以下“配置”脚本:

/ usr / local / opt / php55 / bin / php-config
</ code> </ pre>

不确定如何继续。 我试过安装php56,但它需要相同的依赖。 似乎是一个icu4​​c问题,但这对我来说是一种未知的领域。 谢谢</ p>
</ div>

展开原文

原文

I just upgraded to Yosemite. I was using Apache 2.2, but the upgrade included 2.4. After some configuration nightmares, I ended up reinstalling 2.4 using Homebrew. I have it mostly configured. However, when I use the old httpd.conf settings for php, I get the following error:

Symbol not found: _unixd_config Referenced from: /usr/local/opt/php55/libexec/apache2/libphp5.so Expected in: /usr/local/Cellar/httpd24/2.4.10/bin/httpd in /usr/local/opt/php55/libexec/apache2/libphp5.so

When running brew upgrade php55 I get the following error when updating 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.

Removing the file does not help. I've ran brew doctor, which gives me this concerning 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

Not sure how to proceed. I've tried to install php56, but it needs the same dependency. Seems to be a icu4c issue, but this is kind of unchartered territory for me. Thanks

duanduan8439
duanduan8439 你在httpd.config中为php设置了什么?
接近 6 年之前 回复
duanqiang5722
duanqiang5722 不幸的是,仍然会得到相同的SHA1不匹配错误。
接近 6 年之前 回复
dongwen1871
dongwen1871 如果还没有,请安装xcode6.1。它不在应用程序商店(但),但您可以从developer.apple.com/xcode/downloads->“其他工具”下载(应该在页面顶部)
接近 6 年之前 回复

1个回答

This error has nothing to do with the version of Xcode or GCC, LLVM or Clang you have installed. If you look at the file in question you can see what is happening.

[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>

So, something is wrong with the server, not your machine. The simplest approach is to contact them and let them deal with it (it's something on SourceForge's end), but that doesn't help you install whatever you wanted that depends on ICU. Looking around the internet, there are some copies on mirror sites of the tar archive we're looking for, so simply downloading it manually and moving into your Homebrew cache directory will suffice.

[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

To be honest, I have no idea if this will solve your problem with Apache and PHP. If you still are having issues with the builtin httpd and php, I would wipe out any versions your have installed through Homebrew including their configuration files in /usr/local/etc, upgrade icu4c, and then systematically begin the installation process of Apache, PHP 5.x, and then any php5x-* modules you need in addition again.

I came across the same Homebrew failure trying to reinstall CouchDB, which is entirely different than what your original issue was.

dongyonglie5132
dongyonglie5132 是的,谢谢你为我排除故障! 我挖了很多东西,最后使用了同事的副本,它起作用了......这是icu4c的结尾。 在解决了这个问题后,我能够更新PHP。 我也最终从Homebrew擦除了我的Apache安装并重新配置了原始安装。 它花了一段时间,但让它正常工作。 再次感谢。
接近 6 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问