2

I'm trying to use Linuxbrew to manage my dependencies; however, when I attempt to install I receive an error.

Error: No such file or directory - /usr/local/bin/rub

I have attempted to install using the source files and running

./configur-prefix=$Home/env
make 
make install 

which gives the following report:

installing binary commands:   /env/bin
/home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `mkdir': Permission denied @ dir_s_mkdir - /env (Errno::EACCES)
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `fu_mkdir'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:207:in `block (2 levels) in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `reverse_each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `block in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `mkdir_p'
from ./tool/rbinstall.rb:194:in `makedirs'
from ./tool/rbinstall.rb:306:in `prepare'
from ./tool/rbinstall.rb:344:in `block in <main>'
from ./tool/rbinstall.rb:822:in `block in <main>'
from ./tool/rbinstall.rb:819:in `each'
from ./tool/rbinstall.rb:819:in `<main>'
make: *** [do-install-all] Error 1

Godaddy does not allow sudo or su access. The server info

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

I need Homebrew to install xz and glibc before I can install Ruby, or update the gcc version. Unfortunately, both produce the first error.

Could anyone help me install this package? My real endgoal is updating gcc through brew.

bfontaine
  • 18,169
  • 13
  • 73
  • 107

2 Answers2

3

You don't have needed permissions to do that in the shared hosting:

in `mkdir': Permission denied @ dir_s_mkdir - /env (Errno::EACCES)

When you try to create the directory, the installation fails.

You need a VPS, a dedicated server or a shared hosting preconfigurated.

Hugo L.M
  • 1,053
  • 17
  • 31
  • They don’t need a dedicated server if they can install what they want under their home directory. – bfontaine May 28 '17 at 10:50
  • 2
    I'm not talking about an opinion, I'm talking about my experience with the company @bfontaine. I have tried this, but they have a new product just for Ruby. Since you need root permission, all you will have are problems. They are using an old version of Red Hat and you dont have sudo access... – Hugo L.M May 28 '17 at 11:39
  • 1
    And if it's possible, please, share the method. I will be very pleased. Thank you – Hugo L.M May 28 '17 at 12:20
  • I've since switched hosting providers to Google Cloud 'Compute'. I find the full google cloud platfrom to be designed beautifully for developers – Richard Tyler Miles May 14 '18 at 07:32
  • As off august 2020 in godaddy shared hosting there is simply no way to install brew normally without sudo access, which is not granted. But as @bfontaine was saying you do not need to install brew in the root directory, just install it on your home directory and create an alias for brew. Review my answer for the workaround. – Nicholas Gooding Rios Aug 31 '20 at 01:07
1

I have found out a workaround for this issue to be able to install homebrew without root and sudo access.

Just follow the instruction on the Alternative Installation section of brew.sh and it will wonderfully work with no mayor issues at all.

This option will not work if you do not meet the minimum requirements regarding the glibc version.