bson_ext fails on ubuntu - bson

I have installed all the dependencies for pophealth:
"https://github.com/pophealth/popHealth/wiki/Installation"
but when I run Bundle Install I receive the following error:
Gem:Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem Files will remain installed in /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1 for inspection
results logged to /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1/ext/cbson/gem_make.out
An error occurred while installing bson_ext (1.5.1), and bundler cannot continue.
Make sure that 'gem install bson_ext -v '1.5.1'' succeeds before bundling.
when I run gem install bson_ext -v '1.5.1' i receive the following error

Related

RN CLI error - Failed to build gem native extension, error occurred while installing ffi

When I run npx react-native projectname, the project is only created partially.
Now when I run bundle install I get:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that "gem install ffi -v '1.15.5' --source 'https://rubygems.org/'" succeeds before bundling.
Using atomos 0.1.3
Using bundler 2.1.4
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Fetching ffi 1.15.5
Installing ffi 1.15.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: █████████████████████s/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
█████████████/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r ./siteconf20221129-56735-3mfz1o.rb
extconf.rb
checking for ffi_prep_closure_loc() in -lffi… no
checking for ffi_prep_closure_loc() in -llibffi… no
checking for ffi_prep_closure_loc() in -llibffi-8… no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS… no
checking for whether -pthread is accepted as LDFLAGS… yes
creating extconf.h
creating Makefile
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** █████████████████████ Error 2
make failed, exit code 2
Gem files will remain installed in █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for inspection.
Results logged to █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/extensions/arm64-darwin-21/2.7.0/ffi-1.15.5/gem_make.out
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.15.5' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
cocoapods was resolved to 1.11.3, which depends on
cocoapods-core was resolved to 1.11.3, which depends on
typhoeus was resolved to 1.4.0, which depends on
ethon was resolved to 0.16.0, which depends on
ffi
Yes, I have installed the ffi 1.15.5 (below screenshot) but it is still saying I dont have it
█████████████████████ gem install ffi -v '1.15.5' --source 'https://rubygems.org/ '
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Parsing documentation for ffi-1.15.5
Done installing documentation for ffi after 0 seconds
1 gem installed
Ruby version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
pod --version: 1.11.3
I am impressed how difficult it is to start a project. Someone please help
I've been stuck with this problem for an hour. The fix would be initializing your project on a folder directory without space.
Try running npx react-native init on Desktop and it should work fine.

Error while bundle install windows 10

I have windows 10 and the terminal installed, and when I try and run bundle install I get this output:
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ bundle
The git source `git://github.com/watsonbox/pocketsphinx-ruby.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/.........
Using bundler 1.16.1
Using coderay 1.1.1
Using espeak-ruby 1.0.2
Fetching ffi 1.9.10
Installing ffi 1.9.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-330-1hgm5yc.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out
An error occurred while installing ffi (1.9.10), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.10'` succeeds before bundling.
In Gemfile:
pocketsphinx-ruby was resolved to 0.3.0, which depends on
ffi
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ sudo gem install ffi -v '1.9.10'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-376-15d5pse.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out

Error while trying to install zsteg

While trying to install zsteg on Ubuntu I encounter the following error:
$ sudo gem install zsteg
Building native extensions. This could take a while...
ERROR: Error installing zsteg:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out
ruby2.3, ruby-sec and rake are installed
and also tried:
gem update --system
Please help.

Getting error while installing ffi gem

$ jruby -S bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from http://controller.c3.mtv:8008/....
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from http://controller.c3.mtv:8008/..
Resolving dependencies...
Using rake (10.1.0)
Using ansi (1.4.3)
Using builder (3.2.2)
Installing ffi (1.9.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out
An error occurred while installing ffi (1.9.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.2'` succeeds before bundling.
This was the error when i did a bundle update so i did the following as suggested above in last line
$ gem install ffi -v '1.9.2'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out
Then i tried the following
$ gem install ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out
'make' is not recognized as an internal or external command, operable
program or batch file.
Looks like a Windows error message..do you have make installed on your system? I'd check out Cygwin to avoid getting dependency issues on unix tools.

installing Sqlite3-ruby error

When I tried to install: gem install sqlite3-ruby it shows:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:3
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
My environment:
sqlite: 2.8.17
rails: 3.0.0
ruby: 1.9.2
ubuntu: 10.04
gem: 1.3.7
I have looking all similiar question in webs and SO, nothing help, what should I do? :(
I had this same problem. I solved it by
sudo apt-get install sqlite3 libsqlite3-dev
Then the following command worked.
sudo gem install sqlite3-ruby

Resources