I am running this command on Linux Mint 14 Mate:
rvm pkg install ree_dependencies --verify-downloads 1
and I get this error:
Fetching ncurses-5.7.tar.gz to /home/john/.rvm/archives
Extracting ncurses to /home/john/.rvm/src/ncurses-5.7
Prepare ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running 'autoreconf -is --force', please read /home/john/.rvm/log/ncurses/autoreconf.log
Configuring ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running './configure --prefix=/home/john/.rvm/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs', please read /home/john/.rvm/log/ncurses/configure.log
Compiling ncurses in /home/john/.rvm/src/ncurses-5.7.
Error running 'make', please read /home/john/.rvm/log/ncurses/make.log
and here is the log file:
configure:5967: error: possibly undefined macro: AC_DIVERT_HELP
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
I googled for the solution, but got nothing.
Your help is highly appreciated.
instead of ree_dependencies you should read output of rvm requirements - it will show you what needs to be installed.
A word of advice - REE is based on Ruby 1.8 which is no longer maintained, only security fixes will be released for few months, you really should try a newer ruby like 1.9.3, or if it's new project - try ruby 2.0.0 preview2:
rvm install ruby-2.0.0
Related
I go through the process of installing the rubocop gem install rubocop --version 0.86.0
And run rubocop -v afterwards to make sure everything is fine.
Instead, I receive the message below:
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.2-compliant syntax, but you are running 2.7.0.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
1.8.1
From what I can understand with my limited knowledge, it says that my ruby version is not compatible. Is that right? That I'm using 2.7.0 and I need to use 2.7.2 or above.
I run rvm ls
=* ruby-2.7.2 [ x86_64 ]
Then I try to run ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
I've gone through the process of rvm install 2.7.2 & rvm use 2.7.2 I have toggled-on 'Run command as a login shell' - because that was the only way I could get 'rvm' to work in the terminal.
If someone is able to help me with how I can upgrade my ruby version, it would be greatly appreciated.
Sidenote - I tried to follow the link https://github.com/whitequark/parser#compatibility-with-ruby-mri. 1.8.1 and I willingly admit I don't understand what's going on, on this page or how I can use it to solve the problem.
Lucas R
You can safely ignore this warning. The parser gem takes things very seriously; it is detecting that you are running a different patch version than it expects (2.7.2 instead of 2.7.0), but there are normally no syntax changes between patch versions.
Unrelated note: rubocop 0.86 is very old; you should upgrade if you can.
I am trying to install "pam" on Windows. But starting
$ gem install pam
gives me
generating _pam-x64-mingw32.def
compiling pam_handle.c
In file included from pam_handle.c:5:0:
_pam.h:9:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [pam_handle.o] Error 1
make failed, exit code 2
Ruby DevKit is installed and the Installation is checked with
$ gem install json --platform=ruby
$ ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect"
[42]
I doubt that version.h is unix/linux specific. Has anybody managed to install this gem on Windows?
It looks like pam gem is not supported anymore.
https://rubygems.org/gems/pam says, that the latest release was about 10 years ago.
I'd offer you to consider using some newer replacements, and the most common advice is Use some unix-based OS for Ruby development, instead of windows.
Getting this error when trying to install chef on OS X Yosemite, other gems have installed fine. Not seeing a requirement. Just wondering if anyone has and idea of what the issue is or has come across this.
$sudo gem install chef
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141023-4708-6api21.rb extconf.rb
creating Makefile
/Library/Ruby/Gems/2.0.0/gems/libyajl2-1.1.0/ext/libyajl2
extconf.rb:104:in `makemakefiles': unhandled exception
from extconf.rb:138:in `<main>'
extconf failed, exit code 1
EDIT: Although my answer below will help you install it on the system version of Ruby. I would probably suggest using RVM instead as the comment below mentions. I do not use Ruby very often and it would probably be fine, but I decided to take the 10 mins to change it to installing to RVM since that way I leave the system ruby untouched.
As I was searching across the web, I could actually resolve this issue (which also appeared on docker/ubuntu) as suggested in this thread:
https://stackoverflow.com/a/32191707/1948319
Long story short: The gmp library is missing. You can install it on ubuntu with
sudo apt-get install libgmp3-dev
I had this problem with this gem specifically, and another gem with c extensions as well.
Turns out I needed to accept new terms & conditions after updating XCode :-)
sudo xcodebuild -license
So I actually answered my own question very shortly after I posted and I hope it helps someone else in the future.
I used this instead:
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install chef
The Apple LLVM compiler in Xcode treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
Came across this issue which was similar enough:
https://github.com/FontCustom/fontcustom/issues/194
I am desperately trying to install Hubris but the installation fails whenever I run "cabal install".
Link to Hurbis:
https://github.com/mwotton/Hubris/tree/master/Haskell
Link to the Cabal file:
https://github.com/mwotton/Hubris/blob/master/Haskell/hubris.cabal
The cabal command that fails is:
cabal install --extra-include-dirs=/usr/include/ruby-1.9.1/x86_64-linux --extra-include-dirs=/usr/include/ruby-1.9.1 --extra-lib-dirs=/usr/lib --user --enable-shared --with-ghc=/usr/local/bin/ghc
The error message is:
Resolving dependencies...
Configuring hubris-0.0.4...
cabal: Missing dependencies on foreign libraries:
* Missing C libraries: ruby, ruby, ruby
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Error: some packages failed to install:
hubris-0.0.4 failed during the configure step. The exception was:
ExitFailure 1
THE RAKE ERROR IS THE SAME:
+install -c tmp/x86_64-linux/stub/1.9.3/stub.so lib/stub.so
cabal: Missing dependencies on foreign libraries:
* Missing C libraries: ruby, ruby, ruby
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Error: some packages failed to install:
hubris-0.0.4 failed during the configure step. The exception was:
ExitFailure 1
rake aborted!
ERROR: ran cabal update; cd Haskell; cabal install --extra-include-
dirs=/usr/include/ruby-1.9.1/x86_64-linux --extra-include-dirs=/usr/include/ruby-1.9.1 -
-extra-lib-dirs=/usr/lib --user --enable-shared --with-ghc=/usr/local/bin/ghc, got
Downloading the latest package list from hackage.haskell.org
I also installed 'ruby-dev', e.g.
apt-get install ruby1.9.1-dev
Probably the error is related to missing header files and wrong include directories when I run the cabal command.
.
System Configuration:
ubuntu 12.04
GHC version 7.4.1
ruby version 1.9.3p0
gem version 1.8.24
You should install Hubris using rake. Simply invoking rake in the root of the repository should work. The task that builds the library will find the relevant ruby include directories for you.
I had to make some changes to make the compile work with modern Haskell (E.g. Haskell Platform 2012.2.0.0). The changes are available at https://github.com/dflemstr/Hubris.
It works for me on Arch Linux:
Arch ... well it's rolling release, so there is no version number
GHC version 7.4.2
ruby version 1.9.3p194 (2012-04-20 revision 35410)
gem version 1.8.23
FINAL ANSWER!!! EVERYTHING WORKS!!!
The credit for the right answer goes to User 'dflemstr'. BUT look at this answer for some details, especially for Ubuntu Users. Credit also goes to Mark Wotton, as the install errors where mainly due to Haskell/Cabal and Ubuntu.
_
Requirements:
(tested with this setup, other version probably work too)
Ubuntu 12.04 (Arch Linux works too)
Ruby 1.9.3p0
GHC 7.4.1
Haskell Platform 2012.2.0.0
_
Ruby Installation
sudo apt-get install libruby1.9.1 libruby1.9.1-dbg libtcltk-ruby1.9.1 ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full rubybook rubygems
_
Gem Update System (optional)
sudo env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
_
Fix for Ubuntu
(error Missing C libraries: ruby, ruby, ruby)
cd /usr/lib
ln -s libruby-1.9.1.so ./libruby.so
_
GHC Installation
NOTE: I don't use any ubuntu packages for GHC and the haskell platform. Some people on stackoverflow recommend this.
http://www.haskell.org/ghc/download_ghc_7_4_1
(follow the instructions on the website)
_
Haskel Platform Installation
http://lambda.haskell.org/platform/download/2012.2.0.0/haskell-platform-2012.2.0.0.tar.gz
(again follow the instructions on the website)
.
_
Enable shared library support for haskell packages
Add the following line: "shared: True"
nano ~/.cabal/config
_
Reinstall every haskell package with shared support
Follow the instructions given in:
Building a haskell interpreter (hint) as dynamic library, useable from C++: Missing Interpreter.dyn_hi
Cabal rebuild all with enable-shared flag
NOTE: The above instructions did not work for me!!
In that case, manually reinstall every package by hand (!) with force:
cabal install hint-0.3.3.4 --reinstall --force-reinstall
Repeat with every installed package! e.g. also the mtl package, etc. You may get the same error with a package that is needed for the reinstallation. Just reinstall that package and any recursive dependencies.
If you install Hubris right away, i.e. skipping this step, you get the following error (only in ubuntu, not arch linux):
Language/Ruby/Hubris/LibraryBuilder.hs:13:8:
Could not find module `Control.Monad.Error.Class'
Perhaps you haven't installed the "dyn" libraries for package `mtl-2.0.1.0'?
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
Install needed haskell packages
cabal install c2hs
Install needed ruby packages
sudo gem install rake open4 rspec hoe
sudo gem install bundler
sudo gem install rake-compiler
sudo gem install rspec
Get Hurbis via github
git clone https://github.com/dflemstr/Hubris.git
(Note: This is just for now. As the changes are merged, the original github version from Mark Wotton should be pulled!)
Fix Rakefile to find GHC in ubuntu
Change "/usr/bin/ghc" to "/usr/local/bin/ghc":
cd Hubris
nano Rakefile
Run rake
cd Hubris
rake
If you get errors like "Perhaps you haven't installed the 'dyn' libraries for" here it is possibly due that some package are not reinstalled (see step: 'Reinstall every haskell package with shared support').
**Install Hubris*
cd Hubris
sudo rake install
Install rake
Fix permissions:
chmod -R 777 /var/hubris
NOTE: Don't use 777!! If you do, change later to 755 or 766, etc. This is just for testing!
This is needed because rake install is done with 'sudo' but the cabal packages are installed with a different user. Hubris compiles the haskell files in /var/hubris/ which is not accessible for a regular user unless you change the permissions.
Run test example
Add the following lines to "test.rb":
require 'hubris' # best line ever
class Target
hubris :inline =>"triple::Int->Int; triple n = 10*n"
end
t = Target.new
puts t.triple(3)
Execute test.rb:
ruby test.rb
Check if the result is okay:
The last three lines of the console output should be:
... many lines and possibly GHC error messages ...
|
error ||
30
If the last line is "30" then everything works!! Note that when you run the command a second time the inline haskell is not recompiled, therefore the output is much shorter, but the last line is still "30".
Final Words
Thanks to Mark Wotton for providing Hubris!! It is an excellent starting point to add new features to the library. Great that it is open source!
I am running into the following error. I was using RVM with Ruby 1.9.2 and all worked perfect. I updated to ruby version 1.9.3 und now I am getting an load error when I try to use the irb.
/home/pabera/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- active_support (LoadError)
Actually I have all the readline packages installed (it worked fine with 1.9.2)
Now I tried several thinks, using rvm pkg readline. Doing this, I get the following output.
$ rvm pkg install readline
Fetching readline-5.2.tar.gz to /home/pabera/.rvm/archives
Extracting readline-5.2.tar.gz to /home/pabera/.rvm/src
Applying patch '/home/pabera/.rvm/patches/readline-5.2/shobj-conf.patch'...
Prepare readline in /home/pabera/.rvm/src/readline-5.2.
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
Configuring readline in /home/pabera/.rvm/src/readline-5.2.
Compiling readline in /home/pabera/.rvm/src/readline-5.2.
Installing readline to /home/pabera/.rvm/usr
Fetching readline-6.2.tar.gz to /home/pabera/.rvm/archives
Extracting readline-6.2.tar.gz to /home/pabera/.rvm/src
Applying patch '/home/pabera/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
Prepare readline in /home/pabera/.rvm/src/readline-6.2.
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
Configuring readline in /home/pabera/.rvm/src/readline-6.2.
Compiling readline in /home/pabera/.rvm/src/readline-6.2.
Installing readline to /home/pabera/.rvm/usr
I get the error in the middle, and I don't know how to fix it
Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log
My Autoconf.log output. Might this autoconf problem cause my issues? And yes, how would I fix thos missing templates then?
$ cat /home/pabera/.rvm/log/readline/autoreconf.log
[2012-03-19 10:07:03] autoreconf -is --force
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
...
autoreconf: /usr/bin/autoheader failed with exit status: 1
Do you have any suggestions?
Looks like you might forgot to use a ruby:
rvm use 1.9.3 --default
The default flag will tell rvm to use it for new terminals.
For using with projects (like rails):
cd projects/my-app
rvm use 1.9.3#my-app --rvmrc --create
Which will create a gemset my-app and project configuration file .rvmrc - now when you cd to that dir RVM wil swithc to that ruby#gemset.
There is very nice screencast showing basics of rvm usage: http://screencasts.org/episodes/how-to-use-rvm