2014-10-19 91 views
1

我剛升級到Yosemite。我使用的是Apache 2.2,但升級包括2.4。經過一些配置噩夢後,我結束了使用Homebrew重新安裝2.4。我有它大部分配置。然而,當我使用PHP老httpd.conf的設置,我得到以下錯誤:icu4c - 使用Homebrew安裝Yosemite後更新/安裝php

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

當運行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 doctor,這給了我這個關於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,但它需要相同的依賴關係。似乎是一個icu4​​c問題,但這對我來說是一個未知的領域。謝謝

+0

如果你還沒有安裝xcode 6.1。它不在應用商店(但),但你可以從https://developer.apple.com/xcode/downloads/ - >「其他工具」(應該在頁面頂部)下載它 – soderlind 2014-10-20 08:31:09

+0

@PerS仍然得到不幸的是,相同的SHA1不匹配錯誤。 – Grant 2014-10-21 00:11:44

+0

你在httpd.config中爲php設置了什麼? – bottleboot 2014-10-21 22:04:44

回答

0

這個錯誤與您安裝的Xcode或GCC,LLVM或Clang的版本無關。如果你看看有問題的文件,你可以看到發生了什麼。

[[email protected]]% 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. 

[[email protected]]% file /Library/Caches/Homebrew/icu4c-54.1.tgz 
/Library/Caches/Homebrew/icu4c-54.1.tgz: HTML document text 

[[email protected]]% 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檔案鏡像站點上的一些副本,所以只需手動下載它並移入您的Homebrew緩存目錄就足夠了。

[[email protected]]% 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 

[[email protected]]% 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,PHP 5.x和然後再添加你需要的任何php5x- *模塊。

我遇到了同樣的家釀失敗,試圖重新安裝CouchDB,這與您的原始問題完全不同。

+0

是的,謝謝你對我的疑難解答!我挖了很多東西,最後使用了一個同事的副本,它的工作原理......這是關於icu4c的結局。得到這些後,我能夠更新PHP。我也最終從Homebrew擦除了我的Apache安裝並重新配置了原始安裝。它花了一段時間,但得到它正常工作。再次感謝。 – Grant 2014-12-04 02:53:50