This repository has been archived by the owner. It is now read-only.

Glib could not be linked #5034

Closed
simonszu opened this Issue Apr 4, 2011 · 6 comments

Comments

Projects
None yet
2 participants
@simonszu

simonszu commented Apr 4, 2011

Well, i tried to install glib , and after compiling, homebrew exits and throws this error:

Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
ln: ./glib20.mo: Permission denied
Error: The linking step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link glib'
Error: Could not create symlink /usr/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo.
Check that you have permssions on /usr/local/share/locale/zh_TW/LC_MESSAGES

brew link glib throws the last 2 lines of this error again.

Any other packages which link against glib will fail hereafter.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 4, 2011

Contributor

ln: ./glib20.mo: Permission denied

What does brew doctor say? It looks like some other software was installed that added some root-owned /usr/local/share/locale subfolders.

Contributor

adamv commented Apr 4, 2011

ln: ./glib20.mo: Permission denied

What does brew doctor say? It looks like some other software was installed that added some root-owned /usr/local/share/locale subfolders.

@simonszu

This comment has been minimized.

Show comment
Hide comment
@simonszu

simonszu Apr 4, 2011

This is the output of brew doctor (how do i use quote-tags here?):

~$ brew doctor
If you have installed MacGPG2 via the package installer, several other
checks in this script will turn up problems, such as stray .dylibs in
/usr/local and permissions issues with share and man in /usr/local/.

Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libcharset.1.0.0.dylib
/usr/local/lib/libgcrypt.11.5.2.dylib
/usr/local/lib/libgpg-error.0.5.0.dylib
/usr/local/lib/libiconv.2.4.0.dylib
/usr/local/lib/libusb-0.1.4.4.4.dylib
/usr/local/lib/libusbpp-0.1.4.4.4.dylib

Some folders in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably chown them:

/usr/local/share/locale/be
/usr/local/share/locale/be/LC_MESSAGES
/usr/local/share/locale/ca
/usr/local/share/locale/ca/LC_MESSAGES
/usr/local/share/locale/cs
/usr/local/share/locale/cs/LC_MESSAGES
/usr/local/share/locale/da
/usr/local/share/locale/da/LC_MESSAGES
/usr/local/share/locale/de
/usr/local/share/locale/de/LC_MESSAGES
/usr/local/share/locale/el
/usr/local/share/locale/el/LC_MESSAGES
/usr/local/share/locale/en@boldquot
/usr/local/share/locale/en@boldquot/LC_MESSAGES
/usr/local/share/locale/en@quot
/usr/local/share/locale/en@quot/LC_MESSAGES
/usr/local/share/locale/eo
/usr/local/share/locale/eo/LC_MESSAGES
/usr/local/share/locale/es
/usr/local/share/locale/es/LC_MESSAGES
/usr/local/share/locale/et
/usr/local/share/locale/et/LC_MESSAGES
/usr/local/share/locale/fi
/usr/local/share/locale/fi/LC_MESSAGES
/usr/local/share/locale/fr
/usr/local/share/locale/fr/LC_MESSAGES
/usr/local/share/locale/gl
/usr/local/share/locale/gl/LC_MESSAGES
/usr/local/share/locale/hu
/usr/local/share/locale/hu/LC_MESSAGES
/usr/local/share/locale/id
/usr/local/share/locale/id/LC_MESSAGES
/usr/local/share/locale/it
/usr/local/share/locale/it/LC_MESSAGES
/usr/local/share/locale/ja
/usr/local/share/locale/ja/LC_MESSAGES
/usr/local/share/locale/nb
/usr/local/share/locale/nb/LC_MESSAGES
/usr/local/share/locale/pl
/usr/local/share/locale/pl/LC_MESSAGES
/usr/local/share/locale/pt
/usr/local/share/locale/pt/LC_MESSAGES
/usr/local/share/locale/pt_BR
/usr/local/share/locale/pt_BR/LC_MESSAGES
/usr/local/share/locale/ro
/usr/local/share/locale/ro/LC_MESSAGES
/usr/local/share/locale/ru
/usr/local/share/locale/ru/LC_MESSAGES
/usr/local/share/locale/sk
/usr/local/share/locale/sk/LC_MESSAGES
/usr/local/share/locale/sv
/usr/local/share/locale/sv/LC_MESSAGES
/usr/local/share/locale/tr
/usr/local/share/locale/tr/LC_MESSAGES
/usr/local/share/locale/vi
/usr/local/share/locale/vi/LC_MESSAGES
/usr/local/share/locale/zh_CN
/usr/local/share/locale/zh_CN/LC_MESSAGES
/usr/local/share/locale/zh_TW
/usr/local/share/locale/zh_TW/LC_MESSAGES

Some folders in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably chown them:

/usr/local/share/man/de
/usr/local/share/man/de/man1

/usr/bin is in your PATH before Homebrew's bin. This means that system-
provided programs will be used before Homebrew-provided ones. This is an
issue if you install, for instance, Python.

Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your $PATH.

Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.

Consider editing your .bashrc to add:
/usr/local/sbin
to $PATH.

Some "config" scripts were found in your path, but not in system or Homebrew folders.

./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.

/Library/Frameworks/Python.framework/Versions/2.7/bin
python-config python2.7-config
/usr/local/MacGPG2/bin
gpg-error-config ksba-config libassuan-config libgcrypt-config libusb-config pth-config


Well, yes, i have installed the MacGPG bundle, but i am sure, i am not the only one here.

simonszu commented Apr 4, 2011

This is the output of brew doctor (how do i use quote-tags here?):

~$ brew doctor
If you have installed MacGPG2 via the package installer, several other
checks in this script will turn up problems, such as stray .dylibs in
/usr/local and permissions issues with share and man in /usr/local/.

Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libcharset.1.0.0.dylib
/usr/local/lib/libgcrypt.11.5.2.dylib
/usr/local/lib/libgpg-error.0.5.0.dylib
/usr/local/lib/libiconv.2.4.0.dylib
/usr/local/lib/libusb-0.1.4.4.4.dylib
/usr/local/lib/libusbpp-0.1.4.4.4.dylib

Some folders in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably chown them:

/usr/local/share/locale/be
/usr/local/share/locale/be/LC_MESSAGES
/usr/local/share/locale/ca
/usr/local/share/locale/ca/LC_MESSAGES
/usr/local/share/locale/cs
/usr/local/share/locale/cs/LC_MESSAGES
/usr/local/share/locale/da
/usr/local/share/locale/da/LC_MESSAGES
/usr/local/share/locale/de
/usr/local/share/locale/de/LC_MESSAGES
/usr/local/share/locale/el
/usr/local/share/locale/el/LC_MESSAGES
/usr/local/share/locale/en@boldquot
/usr/local/share/locale/en@boldquot/LC_MESSAGES
/usr/local/share/locale/en@quot
/usr/local/share/locale/en@quot/LC_MESSAGES
/usr/local/share/locale/eo
/usr/local/share/locale/eo/LC_MESSAGES
/usr/local/share/locale/es
/usr/local/share/locale/es/LC_MESSAGES
/usr/local/share/locale/et
/usr/local/share/locale/et/LC_MESSAGES
/usr/local/share/locale/fi
/usr/local/share/locale/fi/LC_MESSAGES
/usr/local/share/locale/fr
/usr/local/share/locale/fr/LC_MESSAGES
/usr/local/share/locale/gl
/usr/local/share/locale/gl/LC_MESSAGES
/usr/local/share/locale/hu
/usr/local/share/locale/hu/LC_MESSAGES
/usr/local/share/locale/id
/usr/local/share/locale/id/LC_MESSAGES
/usr/local/share/locale/it
/usr/local/share/locale/it/LC_MESSAGES
/usr/local/share/locale/ja
/usr/local/share/locale/ja/LC_MESSAGES
/usr/local/share/locale/nb
/usr/local/share/locale/nb/LC_MESSAGES
/usr/local/share/locale/pl
/usr/local/share/locale/pl/LC_MESSAGES
/usr/local/share/locale/pt
/usr/local/share/locale/pt/LC_MESSAGES
/usr/local/share/locale/pt_BR
/usr/local/share/locale/pt_BR/LC_MESSAGES
/usr/local/share/locale/ro
/usr/local/share/locale/ro/LC_MESSAGES
/usr/local/share/locale/ru
/usr/local/share/locale/ru/LC_MESSAGES
/usr/local/share/locale/sk
/usr/local/share/locale/sk/LC_MESSAGES
/usr/local/share/locale/sv
/usr/local/share/locale/sv/LC_MESSAGES
/usr/local/share/locale/tr
/usr/local/share/locale/tr/LC_MESSAGES
/usr/local/share/locale/vi
/usr/local/share/locale/vi/LC_MESSAGES
/usr/local/share/locale/zh_CN
/usr/local/share/locale/zh_CN/LC_MESSAGES
/usr/local/share/locale/zh_TW
/usr/local/share/locale/zh_TW/LC_MESSAGES

Some folders in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
folders, then the install will fail during the link step.
You should probably chown them:

/usr/local/share/man/de
/usr/local/share/man/de/man1

/usr/bin is in your PATH before Homebrew's bin. This means that system-
provided programs will be used before Homebrew-provided ones. This is an
issue if you install, for instance, Python.

Consider editing your .bashrc to put:
/usr/local/bin
ahead of /usr/bin in your $PATH.

Some brews install binaries to sbin instead of bin, but Homebrew's
sbin was not found in your path.

Consider editing your .bashrc to add:
/usr/local/sbin
to $PATH.

Some "config" scripts were found in your path, but not in system or Homebrew folders.

./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.

/Library/Frameworks/Python.framework/Versions/2.7/bin
python-config python2.7-config
/usr/local/MacGPG2/bin
gpg-error-config ksba-config libassuan-config libgcrypt-config libusb-config pth-config


Well, yes, i have installed the MacGPG bundle, but i am sure, i am not the only one here.

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 4, 2011

Contributor

You'll need to chown /usr/local/share/locale/* back from root, at the very least, then rebrew glib

Contributor

adamv commented Apr 4, 2011

You'll need to chown /usr/local/share/locale/* back from root, at the very least, then rebrew glib

@simonszu

This comment has been minimized.

Show comment
Hide comment
@simonszu

simonszu Apr 4, 2011

chown to whom? Myself? chown -R?

simonszu commented Apr 4, 2011

chown to whom? Myself? chown -R?

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Apr 5, 2011

Contributor

My /usr/local/share is owned by "adamv:staff", so I would do:

chown -R adamv:staff /usr/local/share/*

but substituting in your own username.

The MacGPG package installer puts libs in /usr/local and chowns things to root; this interferes with configure/make/make install of lots of software (not just through Homebrew), so we put in a "brew doctor" warning about it.

You'll probably also want to put "/usr/local/bin" ahead of "/usr/bin" in your path, unless you have a specific reason not to.

Contributor

adamv commented Apr 5, 2011

My /usr/local/share is owned by "adamv:staff", so I would do:

chown -R adamv:staff /usr/local/share/*

but substituting in your own username.

The MacGPG package installer puts libs in /usr/local and chowns things to root; this interferes with configure/make/make install of lots of software (not just through Homebrew), so we put in a "brew doctor" warning about it.

You'll probably also want to put "/usr/local/bin" ahead of "/usr/bin" in your path, unless you have a specific reason not to.

@adamv adamv closed this Apr 5, 2011

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 5, 2011

My alias fixbrew:

$ sudo chown -R $USER /usr/local

That should solve some basic permission issue :)

ghost commented Apr 5, 2011

My alias fixbrew:

$ sudo chown -R $USER /usr/local

That should solve some basic permission issue :)

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.