简体   繁体   English

无法使用Homebrew在Mac OS Mavericks上安装PHP

[英]Unable to install PHP on Mac OS Mavericks using Homebrew

I'm pretty noob in terminal, so I wanted to start learning PHP and Laravel 4, and I have set up Apache server and installed Homebrew to install all other packages of PHP and composted and so on, but when I'm trying to install PHP on Homebrew, I always get an error: 我在终端领域相当菜鸟,所以我想开始学习PHP和Laravel 4,并且我已经设置了Apache服务器并安装了Homebrew以安装所有其他PHP软件包和堆肥等,但是当我尝试安装时PHP在Homebrew上,我总是收到错误消息:

This is the command I tried to install with: 这是我尝试安装的命令:

brew install php53

I'm getting the following error message: 我收到以下错误消息:

make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/josegonzalez/homebrew-php/issues

/usr/local/Library/Homebrew/utils.rb:319:in `rescue in open': uninitialized constant     
   GitHub::OpenSSL (NameError)
from /usr/local/Library/Homebrew/utils.rb:304:in `open'
from /usr/local/Library/Homebrew/utils.rb:345:in `issues_matching'
from /usr/local/Library/Homebrew/utils.rb:373:in `issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:171:in `fetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:167:in `issues'
from /usr/local/Library/Homebrew/exceptions.rb:208:in `dump'
from /usr/local/Library/brew.rb:133:in `rescue in <main>'
from /usr/local/Library/brew.rb:72:in `<main>'

I always run brew doctor : 我总是做brew doctor

brew doctor

Which produces the following warning: 产生以下警告:

Warning: You have an outdated version of /usr/bin/install_name_tool installed. 警告:您已安装了/ usr / bin / install_name_tool的过时版本。 This will cause binary package installations to fail. 这将导致二进制软件包安装失败。 This can happen if you install osx-gcc-installer or RailsInstaller. 如果安装osx-gcc-installer或RailsInstaller,可能会发生这种情况。 To restore it, you must reinstall OS X or restore the binary from the OS packages. 要还原它,必须重新安装OS X或从OS软件包中还原二进制文件。

What am I doing wrong? 我究竟做错了什么? How can I fix this problem? 我该如何解决这个问题?

It seems like others have had this issue. 好像其他人遇到了这个问题。 One suggestion was to use 一个建议是使用

xcode-select --install

I found that here: https://github.com/Homebrew/homebrew-php/issues/1172 我在这里找到了: https : //github.com/Homebrew/homebrew-php/issues/1172

If you've only just installed xcode tools, you might also be getting an earlier error stating that you haven't accepted xcode's license requirements. 如果仅安装了xcode工具,则可能还会收到一个较早的错误,指出您尚未接受xcode的许可证要求。 Try entering the command: 尝试输入命令:

xcodebuild -license

and follow the instructions to accept the xcode T&C. 并按照说明接受Xcode条款和条件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM