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,并且它抱怨许可问题。我把文件夹改成了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.
5 个解决方案
#1
96
I figured what the problem was. It was issues with premission and I basically did this
我发现了问题所在。这是关于任务的问题,我基本上就是这么做的
sudo chown -R $(whoami) /usr/local/lib/
#2
1
I believe You should:
我认为你应该:
sudo chmod 775 /usr/local/lib/
and make sure You are member of the file's group.
并确保您是文件组的成员。
#3
1
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
这并不是一个真正的答案,而是一个评论,它可能会帮助那些疯狂地扯掉头发,并在链接时仍然得到“不可写”的错误的人。例如,来自$ 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.
我建议您检查链接的文件和它的依赖项,或者删除它们并通过homebrew重新安装,或者不使用homebrew安装包。
#4
1
In my system this worked perfectly.
在我的系统中,这是完美的。
chown -R $(whoami) /usr/local/share/
#5
0
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]
#1
96
I figured what the problem was. It was issues with premission and I basically did this
我发现了问题所在。这是关于任务的问题,我基本上就是这么做的
sudo chown -R $(whoami) /usr/local/lib/
#2
1
I believe You should:
我认为你应该:
sudo chmod 775 /usr/local/lib/
and make sure You are member of the file's group.
并确保您是文件组的成员。
#3
1
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
这并不是一个真正的答案,而是一个评论,它可能会帮助那些疯狂地扯掉头发,并在链接时仍然得到“不可写”的错误的人。例如,来自$ 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.
我建议您检查链接的文件和它的依赖项,或者删除它们并通过homebrew重新安装,或者不使用homebrew安装包。
#4
1
In my system this worked perfectly.
在我的系统中,这是完美的。
chown -R $(whoami) /usr/local/share/
#5
0
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]