Homebrew / homebrew-portable-ruby

🚗 Versions of Ruby that can be installed and run from anywhere on the filesystem.
BSD 2-Clause "Simplified" License
133 stars 43 forks source link

Permission issue for non-root installtion #133

Closed libook closed 3 years ago

libook commented 3 years ago

Hi, I am trying to install homebrew in my linux environment for a non-root user (with this manual). It seems that homebrew would download the tar package of portable-ruby and extract it. Then I met the permission error like: tar: portable-ruby/2.6.3_2/share/terminfo/N/NCRVT100WPP: Cannot open: Permission denied

I used tar -ztvf portable-ruby.tar.gz and saw the files are owned by root. (If I did it the right way.)

So how can I deal with this?

libook commented 3 years ago

I solved this.

  1. I extracted the tar package as root and did chown it to my non-root user.
  2. I edited the file ~/.linuxbrew/Homebrew/Library/Homebrew/cmd/vendor-install.sh. Remove codes about renaming and extracting tar package (line 205-229).
  3. Run brew.
  4. Done.