brew 链接 mysql 没有完成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12812613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
brew link mysql did not complete
提问by tawheed
For some some reason brew does not link mysql and it complains about permission.
I chmod
the folder to 777
but I am still having the same issues
由于某种原因 brew 没有链接 mysql 并且它抱怨权限。我chmod
的文件夹,777
但我仍然有同样的问题
laptop$ brew install mysql
Error:
错误:
mysql-5.5.27 already installed, it's just not linked
laptop$ brew link mysql
Linking /usr/local/Cellar/mysql/5.5.27... Warning: Could not link mysql.
Unlinking...
正在取消关联...
Error:
Could not symlink file: /usr/local/Cellar/mysql/5.5.27/lib/plugin
/usr/local/lib is not writable. You should change its permissions.
回答by tawheed
I figured what the problem was. It was issues with premission and I basically did this
我想出了什么问题。这是权限问题,我基本上是这样做的
sudo chown -R $(whoami) /usr/local/lib/
回答by Klāvs Taube
I believe You should:
我相信你应该:
sudo chmod 775 /usr/local/lib/
and make sure You are member of the file's group.
并确保您是文件组的成员。
回答by Centzon
Not really an answer, but a comment that may help those who are pulling out hair chown
ing and chmod
ing like crazy and still getting "not writeable" errors at linking. For example, from $ brew doctor -d
不是真正的答案,而是一个评论,它可能会帮助那些疯狂地拔毛chown
并chmod
在链接时仍然遇到“不可写”错误的人。例如,从$ brew doctor -d
Error: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
I suggest you check the linked file and it's dependencies and either delete them and reinstall via homebrew, or install the package without using homebrew.
我建议您检查链接文件及其依赖项,然后删除它们并通过自制软件重新安装,或者不使用自制软件安装软件包。
回答by cody123
In my system this worked perfectly.
在我的系统中,这工作得很好。
chown -R $(whoami) /usr/local/share/
回答by Narek Tootikian
I am trying to give a general answer to the question.
It happens that neither /usr/local/lib/
nor /usr/local/share
/ gives error. You should look the exact directory that is not writable. It is mentioned right after "Error: Could not symlink". So execute the command for that directory.
我试图对这个问题给出一个笼统的答案。碰巧既不/usr/local/lib/
也不/usr/local/share
/ 给出错误。您应该查看不可写的确切目录。在“错误:无法符号链接”之后立即提到它。所以执行该目录的命令。
chown -R $(whoami) [/bath/to/your/dir]