Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

2K
Visualizações
ERROR: Error installing racc: ERROR: Failed to build gem native extension
  • Ubuntu 20.04.2 LTS
  • Installing Rails 6.1.3.1
  • Ruby: 2.6.5

Installing rails:

gem install rails -v 6.1.3.1 --no-doc

Fails to install racc-1.5.2

Trying to manually install racc-1.5.2:

gem install racc -v '1.5.2' --source 'https://rubygems.org/' --no-doc

produces the same error.

The following is an 'edited' output of the error:

$ gem install rails -v 6.1.3.1 --no-doc

Fetching racc-1.5.2.gem
Fetching zeitwerk-2.4.2.gem
...
Successfully installed rack-2.2.3
Successfully installed rack-test-1.1.0
Building native extensions. This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    current directory: /home/user/.rvm/gems/ruby-2.6.5@gemset/gems/racc-1.5.2/ext/racc/cparse
/home/user/.rvm/rubies/ruby-2.6.5/bin/ruby -I /home/user/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0 -r ./siteconf20210503-658786-pkp97m.rb extconf.rb
checking for rb_ary_subseq()... yes
creating Makefile

current directory: /home/user/.rvm/gems/ruby-2.6.5@gemset/gems/racc-1.5.2/ext/racc/cparse
make "DESTDIR=" clean

current directory: /home/user/.rvm/gems/ruby-2.6.5@gemset/gems/racc-1.5.2/ext/racc/cparse
make "DESTDIR="
compiling cparse.c
linking shared-object racc/cparse.so

current directory: /home/user/.rvm/gems/ruby-2.6.5@gemset/gems/racc-1.5.2/ext/racc/cparse
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.-.racc.time] Error 127

make install failed, exit code 2

Gem files will remain installed in /home/user/.rvm/gems/ruby-2.6.5@gemset/gems/racc-1.5.2 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.6.5@gemset/extensions/x86_64-linux/2.6.0/racc-1.5.2/gem_make.out


over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The main problem here is that the command mkdir is being called at a specific location, and it's just not there:

make: /usr/bin/mkdir: Command not found

To fix this, you need to add a symbolic link to that location:

$ sudo ln -s /bin/mkdir /usr/bin/mkdir

Run gem install again on rails and all should be good!

Thanks to user dem1tris from brining up a related topic, and providing the answer: make: /usr/bin/mkdir: Command not found during `gem install nokogiri` in Ubuntu 20.04

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda