Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Installing Forem on Linux "installing libv8 (8.4.255.0), and Bundler cannot continue" #12189

Closed
lucidkit opened this issue Jan 9, 2021 · 4 comments

Comments

@lucidkit
Copy link

lucidkit commented Jan 9, 2021

Can't able to install forem on Linux (Ubuntu 18.04 with 8GB RAM), Since last 2 days I have been trying to install forem on VPS but unfortunately, I can't able to successfully install it.

I have followed everything described on official docs https://docs.dev.to/installation/linux/

Since forem, doesn't have any version, so I have forked everything on the repository as per today 9.01.2021
Installed ruby-version: version 2.7.2
Installed Elasticsearch: version 7.5.2

when try to run "bin/setup", the following error occurs:

Error: Command 'vpython third_party/depot_tools/update_depot_tools_toggle.py --disable' returned non-zero exit status 1 in
/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor
An error occurred while installing libv8 (8.4.255.0), and Bundler cannot continue.
Make sure that 'gem install libv8 -v '8.4.255.0' --source 'https://rubygems.org/'' succeeds before bundling.

The full error message is:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
 current directory: /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8
/home/reez/.rbenv/versions/2.7.2/bin/ruby -I /home/reez/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r ./siteconf20210109-21924-us44pb.rb extconf.rb
creating Makefile
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
....
....
....
`
`[0:03:05] Still working on:
[0:03:05]   v8
________ running 'vpython third_party/depot_tools/update_depot_tools_toggle.py --disable' in
'/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor'
/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor/depot_tools/.cipd_bin/.cipd/pkgs/0/fI6WggdkRyN1r91MnTeApc2_gyTtXfYpueHZVLcaF8gC/vpython:
could not resolve options: failed to resolve Python script: stat
/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor/third_party/depot_tools/update_depot_tools_toggle.py: no such file or
directory
Error: Command 'vpython third_party/depot_tools/update_depot_tools_toggle.py --disable' returned non-zero exit status 1 in
/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor
Running: gclient root
Running: gclient config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Running: gclient sync --with_branch_heads
Subprocess failed with return code 2.
/home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:83:in `block in setup_build_deps!': unable to fetch v8 source
(RuntimeError)
	from /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `chdir'
	from /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `setup_build_deps!'
	from /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:40:in `build_libv8!'
	from /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/location.rb:24:in `install!'
	from extconf.rb:7:in `<main>'

extconf failed, exit code 1
Gem files will remain installed in /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0 for inspection.
Results logged to /home/reez/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/libv8-8.4.255.0/gem_make.out

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

In Gemfile:
  mini_racer was resolved to 0.3.1, which depends on
    libv8

== Command ["bundle install"] failed ==

So I googled the issues and I tried everything

https://stackoverflow.com/questions/27875073/an-error-occurred-while-installing-libv8-3-16-14-7-and-bundler-cannot-continu#answer-62413041
https://stackoverflow.com/questions/19673714/error-installing-libv8-error-failed-to-build-gem-native-extension#answer-19674065
https://gist.github.com/fernandoaleman/868b64cd60ab2d51ab24e7bf384da1ca

but I could able to resolve.

According to this rubyjs/libv8#310 (comment), I have tried downgrading bundler

gem install bundler -v 2.1.4

Still, it doesn't solve.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2021

Thanks for the issue! We'll take your request into consideration and follow up if we decide to tackle this issue.

To our amazing contributors: issues labeled type: bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem/oss and we will follow up within 3 business days.

For full info on how to contribute, please check out our contributors guide.

@f2k2game
Copy link

f2k2game commented Jan 9, 2021

I too had same problem, You might have two installed bundle version, uninstall 2.2.4

>> gem uninstall bundler

Gem bundler-2.1.4 cannot be uninstalled because it is a default gem
Select gem to uninstall:
 1. bundler-2.1.4
 2. bundler-2.2.4
 3. All versions

>> 2

Successfully uninstalled bundler-2.2.4

>> bundle --version

Bundler version 2.1.4

@lucidkit
Copy link
Author

lucidkit commented Jan 9, 2021

I too had same problem, You might have two installed bundle version, uninstall 2.2.4

>> gem uninstall bundler

Gem bundler-2.1.4 cannot be uninstalled because it is a default gem
Select gem to uninstall:
 1. bundler-2.1.4
 2. bundler-2.2.4
 3. All versions

>> 2

Successfully uninstalled bundler-2.2.4

>> bundle --version

Bundler version 2.1.4

Thanks, it worked

@rhymes
Copy link
Contributor

rhymes commented Jan 11, 2021

Closing this as the author marked it solved

@rhymes rhymes closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants