I’m on a linux machine at university and don’t have sudo rights. However, I’d like to install some software like gnuplot, rstudio, a fortran compiler and the like without calling for IT every single time. I’ve used homebrew on OS X for 5 years or so, so I figured linuxbrew would work.
I have installed git from apt-get (got the IT guy to do it) and installed curl and patchelf from source. When I try to install any package, be it a bottle or from source, it fails due to the INSTALL_RECEIPT having the wrong permissions. Here’s the verbose output of
brew install m4
==> Downloading https://linuxbrew.bintray.com/bottles/m4-1.4.18.x86_64_linux.bottle.tar.gz Already downloaded: /home/au522021/.cache/Homebrew/downloads/9fbd4721316274995db37b5f92441b550d09bd131339ecc447377ee886970363--m4-1.4.18.x86_64_linux.bottle.tar.gz ==> Verifying 9fbd4721316274995db37b5f92441b550d09bd131339ecc447377ee886970363--m4-1.4.18.x86_64_linux.bottle.tar.gz checksum ==> Pouring m4-1.4.18.x86_64_linux.bottle.tar.gz tar xf /home/au522021/.cache/Homebrew/downloads/9fbd4721316274995db37b5f92441b550d09bd131339ecc447377ee886970363--m4-1.4.18.x86_64_linux.bottle.tar.gz -C /tmp/d20190221-28950-hqhgto cp -pR /tmp/d20190221-28950-hqhgto/m4/. /home/au522021/.linuxbrew/Cellar/m4 chmod -Rf +w /tmp/d20190221-28950-hqhgto /home/au522021/.linuxbrew/bin/patchelf --force-rpath --set-rpath /home/au522021/.linuxbrew/lib --set-interpreter /home/au522021/.linuxbrew/lib/ld.so /home/au522021/.linuxbrew/Cellar/m4/1.4.18/bin/m4 Error: Invalid argument @ chown_internal - /home/au522021/.linuxbrew/Cellar/m4/1.4.18/.INSTALL_RECEIPT.json20190221-28950-zy84nb Warning: Bottle installation failed: building from source.
Building from source also fails with the same error and the error happens to all packages I’ve tried.
I tried looking and it seems it may be related to the way the computer is set up, that is on a NFS4 server or something. I tried looking at the homebrew ruby source and figure out how to change the behavior, but with no luck.
I can sort of “install packages manually”, that is
- downloading a bottle from https://linuxbrew.bintray.com/bottles/
- unpack it
- run chmod 664 on file
- run patchelf to set the correct paths for the dynamic loading of shared libraries
- cp directory to ~/.Linuxbrew/Cellar
- run brew link