Linuxbrew-core: Cannot install glib

Created on 10 Mar 2019  路  10Comments  路  Source: Homebrew/linuxbrew-core

Hi All, my system is Redhat 7.5/64.

$ brew install glib
Updating Homebrew...
==> Downloading https://download.gnome.org/sources/glib/2.60/glib-2.60.0.tar.xz
==> Downloading from https://mirrors.dotsrc.org/gnome/sources/glib/2.60/glib-2.60.0.tar.xz

################################################################## 100.0%

==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/6164294a7/glib/hardcoded-paths.diff

################################################################## 100.0%

==> Patching
==> Applying hardcoded-paths.diff
patching file gio/gdbusprivate.c
patching file gio/xdgmime/xdgmime.c
patching file glib/gutils.c
==> meson --prefix=/home/albert/.linuxbrew/Cellar/glib/2.60.0 -Dgio_module_dir=/home/albert/.linuxbrew/lib/gio/modules -Dbsymbolic_functions=fa
==> ninja -v
==> ninja install -v
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory @ rb_sysopen - /home/albert/.linuxbrew/Cellar/glib/2.60.0/lib/pkgconfig/gio-2.0.pc

bug outdated

Most helpful comment

Does commenting out this part of the code help? https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/glib.rb#L51-L56

All 10 comments

I met the same issue. My system is CentOS 7.6.
==> Downloading https://download.gnome.org/sources/glib/2.60/glib-2.60.0.tar.xz
Already downloaded: /home/wangyuchen/.cache/Homebrew/downloads/71e93211590c03e34d5c182af3034c8dcc47657e6a171cc25f66d08fc9443e74--glib-2.60.0.tar.xz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/61642
Already downloaded: /home/x/.cache/Homebrew/downloads/7a31846424d243e8c4ab3c738fb92a52aa1a0522d78af7b1ec92cc3729cad494--hardcoded-paths.diff
==> Patching
==> Applying hardcoded-paths.diff
patching file gio/gdbusprivate.c
patching file gio/xdgmime/xdgmime.c
patching file glib/gutils.c
==> meson --prefix=/home/x/.linuxbrew/Cellar/glib/2.60.0_1 -Dgio_module
==> ninja -v
==> ninja install -v
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory @ rb_sysopen - /home/x/.linuxbrew/Cellar/glib/2.60.0_1/lib/pkgconfig/gio-2.0.pc

Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like util-linux. If it's an option for you, you could open a ticket with your information systems department to ask that they create a linuxbrew role account with home directory /home/linuxbrew.

The precompiled binary bottles of non-relocatable bottles can only be used if you install in /home/linuxbrew/.linuxbrew, otherwise they have to be built from source. See the documentation below. On macOS the default installation directory is /usr/local. On Linux the default installation directory is /home/linuxbrew/.linuxbrew.

Does commenting out this part of the code help? https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/glib.rb#L51-L56

The comment of L51-L56 works, thanks! @iMichka

Can somebody run brew install glib -svd, and have a look in /tmp when the build fails in which folder the gio-2.0.pc is located?

I can not reproduce this.

I have the same issue.

Commenting L51-56 can have glib installed, but when installing other libraries (like cairo) it still gives error about "cannot find glib".

I have searched the tmp folder but there is no gio-2.0.pc there. Manually running ninja -v install does not install the gio files either.

I want to correct my previous post.

The pkg-config files of glib are successfully installed at .linuxbrew/Cellar/glib/2.60.0_1/lib64/pkgconfig/, but they are not linked to .linuxbrew/lib/pkgconfig/

Manually link all the .pc files can solve the issue (for now).

I found that out, it is lib64 on centos. This should be fixed with #12083

Confirm #12083 works. Thank you!

Fixed by #12083

Was this page helpful?
0 / 5 - 0 ratings