Project

General

Profile

Issue running bundle install - Ubuntu 18.04

Added by rio ancho about 3 years ago

Hi
Hoping someone can help. I'm attempting to install Redmine on a fresh Ubuntu 18.04 instance but having some issues - I'm new to Redmine and my experience with Linux is a bit limited.

I'm following the "Installing Redmine" document - I have installed PostgreSQL (apt install postgresql postgresql-contrib) and Ruby 2.5 (apt install ruby-full), configured the database.yml and installed bundler (gem install bundler).

When running "bundle install --without development test" however I'm getting a whole bunch of errors (see below).

Could anyone familiar with this point me in the right direction? Have I just missed a pre-requisite?

Thanks

ubuntu@ip-192-168-15-53:~/redmine-4.1.1$ bundle install --without development test
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies....
Following files may not be writable, so sudo is needed:
/usr/local/bin
/var/lib/gems/2.5.0
/var/lib/gems/2.5.0/build_info
/var/lib/gems/2.5.0/cache
/var/lib/gems/2.5.0/doc
/var/lib/gems/2.5.0/extensions
/var/lib/gems/2.5.0/gems
/var/lib/gems/2.5.0/specifications
Fetching rake 13.0.3
Installing rake 13.0.3
Fetching minitest 5.14.3
Fetching concurrent-ruby 1.1.8
Installing minitest 5.14.3
Fetching thread_safe 0.3.6
Installing concurrent-ruby 1.1.8
Installing thread_safe 0.3.6
Fetching builder 3.2.4
Fetching erubi 1.10.0
Installing erubi 1.10.0
Installing builder 3.2.4
Fetching mini_portile2 2.4.0
Fetching crass 1.0.6
Installing crass 1.0.6
Installing mini_portile2 2.4.0
Fetching rack 2.2.3
Fetching nio4r 2.5.4
Installing nio4r 2.5.4 with native extensions
Installing rack 2.2.3
Fetching websocket-extensions 0.1.5
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Installing websocket-extensions 0.1.5
Fetching method_source 1.0.0
Fetching thor 1.1.0
Installing method_source 1.0.0
Installing thor 1.1.0
Fetching arel 9.0.0
Fetching mimemagic 0.3.5
Installing arel 9.0.0
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Installing mimemagic 0.3.5
Using bundler 2.2.8
Fetching csv 3.1.9
Fetching htmlentities 4.3.4
Installing csv 3.1.9
Installing htmlentities 4.3.4
Fetching mini_magick 4.9.5
Fetching net-ldap 0.16.3
Installing mini_magick 4.9.5
Fetching pg 1.1.4
Installing net-ldap 0.16.3
Fetching ruby-openid 2.9.2
Installing pg 1.1.4 with native extensions
Installing ruby-openid 2.9.2
Fetching rbpdf-font 1.19.1
Fetching redcarpet 3.5.1
Installing redcarpet 3.5.1 with native extensions
Fetching rouge 3.12.0
Installing rouge 3.12.0
Installing rbpdf-font 1.19.1
Fetching i18n 1.6.0
Installing i18n 1.6.0
Fetching tzinfo 1.2.9
Installing tzinfo 1.2.9
Fetching nokogiri 1.10.10
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching sprockets 4.0.2
Installing sprockets 4.0.2
Fetching request_store 1.4.1
Installing request_store 1.4.1
Fetching websocket-driver 0.7.3
Installing websocket-driver 0.7.3 with native extensions
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching rack-openid 1.4.2
Installing rack-openid 1.4.2
Fetching rbpdf 1.20.1
Installing rbpdf 1.20.1
Fetching activesupport 5.2.4.2
Installing activesupport 5.2.4.2
Fetching css_parser 1.8.0
Installing css_parser 1.8.0
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activemodel 5.2.4.2
Installing activemodel 5.2.4.2
Fetching activejob 5.2.4.2
Installing activejob 5.2.4.2
Fetching activerecord 5.2.4.2
Installing activerecord 5.2.4.2
Installing nokogiri 1.10.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20210203-9373-6513wlnokogiri-1.10.10/gems/nokogiri-1.10.10/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20210203-9373-18k1ww0.rb extconf.rb
checking if the C compiler accepts ... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
--help
--clean
/usr/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.5.0/mkmf.rb:574:in `block in try_compile'
from /usr/lib/ruby/2.5.0/mkmf.rb:521:in `with_werror'
from /usr/lib/ruby/2.5.0/mkmf.rb:574:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /usr/lib/ruby/2.5.0/mkmf.rb:632:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:416:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/tmp/bundler20210203-9373-6513wlnokogiri-1.10.10/extensions/aarch64-linux/2.5.0/nokogiri-1.10.10/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20210203-9373-6513wlnokogiri-1.10.10/gems/nokogiri-1.10.10 for inspection.
Results logged to /tmp/bundler20210203-9373-6513wlnokogiri-1.10.10/extensions/aarch64-linux/2.5.0/nokogiri-1.10.10/gem_make.out

An error occurred while installing nokogiri (1.10.10), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.10.10' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.4.2, which depends on
actioncable was resolved to 5.2.4.2, which depends on
actionpack was resolved to 5.2.4.2, which depends on
actionview was resolved to 5.2.4.2, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20210203-9373-w4rq3qnio4r-2.5.4/gems/nio4r-2.5.4/ext/nio4r
/usr/bin/ruby2.5 -r ./siteconf20210203-9373-1djaekl.rb extconf.rb
checking for unistd.h... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
/usr/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.5.0/mkmf.rb:590:in `try_cpp'
from /usr/lib/ruby/2.5.0/mkmf.rb:1097:in `block in have_header'
from /usr/lib/ruby/2.5.0/mkmf.rb:947:in `block in checking_for'
from /usr/lib/ruby/2.5.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /usr/lib/ruby/2.5.0/mkmf.rb:320:in `open'
from /usr/lib/ruby/2.5.0/mkmf.rb:350:in `block in postpone'
from /usr/lib/ruby/2.5.0/mkmf.rb:320:in `open'
from /usr/lib/ruby/2.5.0/mkmf.rb:346:in `postpone'
from /usr/lib/ruby/2.5.0/mkmf.rb:946:in `checking_for'
from /usr/lib/ruby/2.5.0/mkmf.rb:1096:in `have_header'
from extconf.rb:15:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/tmp/bundler20210203-9373-w4rq3qnio4r-2.5.4/extensions/aarch64-linux/2.5.0/nio4r-2.5.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20210203-9373-w4rq3qnio4r-2.5.4/gems/nio4r-2.5.4 for inspection.
Results logged to /tmp/bundler20210203-9373-w4rq3qnio4r-2.5.4/extensions/aarch64-linux/2.5.0/nio4r-2.5.4/gem_make.out

An error occurred while installing nio4r (2.5.4), and Bundler cannot continue.
Make sure that `gem install nio4r -v '2.5.4' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.4.2, which depends on
actioncable was resolved to 5.2.4.2, which depends on
nio4r

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20210203-9373-92u8j5websocket-driver-0.7.3/gems/websocket-driver-0.7.3/ext/websocket-driver
/usr/bin/ruby2.5 -r ./siteconf20210203-9373-9s4gnx.rb extconf.rb
creating Makefile

current directory: /tmp/bundler20210203-9373-92u8j5websocket-driver-0.7.3/gems/websocket-driver-0.7.3/ext/websocket-driver
make "DESTDIR=" clean
sh: 1: make: not found

current directory: /tmp/bundler20210203-9373-92u8j5websocket-driver-0.7.3/gems/websocket-driver-0.7.3/ext/websocket-driver
make "DESTDIR="
sh: 1: make: not found

make failed, exit code 127

Gem files will remain installed in /tmp/bundler20210203-9373-92u8j5websocket-driver-0.7.3/gems/websocket-driver-0.7.3 for inspection.
Results logged to /tmp/bundler20210203-9373-92u8j5websocket-driver-0.7.3/extensions/aarch64-linux/2.5.0/websocket-driver-0.7.3/gem_make.out

An error occurred while installing websocket-driver (0.7.3), and Bundler cannot continue.
Make sure that `gem install websocket-driver -v '0.7.3' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.4.2, which depends on
actioncable was resolved to 5.2.4.2, which depends on
websocket-driver

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  • extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers. Check the mkmf.log file for more details. You may
    need configuration options.
current directory: /tmp/bundler20210203-9373-5csqogpg-1.1.4/gems/pg-1.1.4/ext
/usr/bin/ruby2.5 -r ./siteconf20210203-9373-rg3wdp.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
/usr/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0'
from /usr/lib/ruby/2.5.0/mkmf.rb:559:in `try_link'
from extconf.rb:40:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/tmp/bundler20210203-9373-5csqogpg-1.1.4/extensions/aarch64-linux/2.5.0/pg-1.1.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20210203-9373-5csqogpg-1.1.4/gems/pg-1.1.4 for inspection.
Results logged to /tmp/bundler20210203-9373-5csqogpg-1.1.4/extensions/aarch64-linux/2.5.0/pg-1.1.4/gem_make.out

An error occurred while installing pg (1.1.4), and Bundler cannot continue.
Make sure that `gem install pg -v '1.1.4' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
pg

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20210203-9373-eonddzredcarpet-3.5.1/gems/redcarpet-3.5.1/ext/redcarpet
/usr/bin/ruby2.5 -r ./siteconf20210203-9373-6cmxpp.rb extconf.rb
creating Makefile

current directory: /tmp/bundler20210203-9373-eonddzredcarpet-3.5.1/gems/redcarpet-3.5.1/ext/redcarpet
make "DESTDIR=" clean
sh: 1: make: not found

current directory: /tmp/bundler20210203-9373-eonddzredcarpet-3.5.1/gems/redcarpet-3.5.1/ext/redcarpet
make "DESTDIR="
sh: 1: make: not found

make failed, exit code 127

Gem files will remain installed in /tmp/bundler20210203-9373-eonddzredcarpet-3.5.1/gems/redcarpet-3.5.1 for inspection.
Results logged to /tmp/bundler20210203-9373-eonddzredcarpet-3.5.1/extensions/aarch64-linux/2.5.0/redcarpet-3.5.1/gem_make.out

An error occurred while installing redcarpet (3.5.1), and Bundler cannot continue.
Make sure that `gem install redcarpet -v '3.5.1' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
redcarpet


Replies (2)

The same problem - Added by manlsea Zheng about 3 years ago

I also encountered exactly the same problem, who can help us? Okami

redmine 4.1.1 on Aarch64 Raspberry

mkmf.log:

"gcc -o conftest -I/usr/include/aarch64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-LkdST2/ruby2.5-2.5.5=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC  conftest.c  -L. -L/usr/lib/aarch64-linux-gnu -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.5  -lpthread -lgmp -ldl -lcrypt -lm   -lc " 
checked program was:
/* begin */
1: #include "ruby.h" 
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

RE: Issue running bundle install - Ubuntu 18.04 - Added by manlsea Zheng about 3 years ago

Hello, man, I solved this problem. Hope it works for you:
sudo apt-get install make gcc

    (1-2/2)