Ubuntu 12.10 - Ruby gem rmagick missing dependency issue - ruby

Like many others I'm having trouble installing rmagick on Ubuntu when running bundle install.
I get this error on the bundle install command:
Installing rmagick (2.13.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.8.7-p371/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/rvm/gems/ruby-1.8.7-p371/bin:/usr/local/rvm/gems/ruby-1.8.7-p371#global/bin:/usr/local/rvm/rubies/ruby-1.8.7-p371/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
*** 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/local/rvm/rubies/ruby-1.8.7-p371/bin/ruby
Gem files will remain installed in /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1 for inspection.
Results logged to /home/selfsale/.bundler/tmp/2908/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
I then did some searching and found some suggestions for adding the missing libs:
sudo apt-get install libmagick9-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmagick9-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
graphicsmagick-libmagick-dev-compat
E: Package 'libmagick9-dev' has no installation candidate
sudo apt-get install graphicsmagick-libmagick-dev-compat:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
graphicsmagick-libmagick-dev-compat : Depends: libgraphicsmagick1-dev but it is not going to be installed
Depends: libgraphicsmagick++1-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagickwand-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagickcore-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickcore-dev : Depends: libbz2-dev but it is not going to be installed
Depends: libfreetype6-dev but it is not going to be installed
Depends: libpng-dev
Depends: librsvg2-dev but it is not going to be installed
Depends: libwmf-dev but it is not going to be installed
Depends: libx11-dev but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
Depends: libxt-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libmagick++-dev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagick++-dev : Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
Depends: libmagickwand-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
It seems that any attempt to install the correct packages comes up with this problem.
I've just seen a post about installing imagemagick from source so I'm going to try that, but if anyone has any better ideas I'd love to hear them.
Thanks

I found the solution:
sudo apt-get install aptitude
Then fire:
sudo aptitude install graphicsmagick-libmagick-dev-compat
When asked:
The following actions will resolve these dependencies:
Keep the following packages at their current version
1) graphicsmagick-libmagick-dev-compat [Not Installed]
2) libexif-dev [Not Installed]
3) libgraphicsmagick++1-dev [Not Installed]
4) libgraphicsmagick1-dev [Not Installed]
Answer: "n"
Accept this solution? [Y/n/q/?] n
In second question:
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libexif12 [0.6.20-2ubuntu0.1 (now) -> 0.6.20-2 (precise)]
Answer: "Y" or hit ENTER
Accept this solution? [Y/n/q/?]
Wait until task end ;)

I just tried on my laptop (Ubuntu 13.04).
gem install rmagick
failed too. Then I did
sudo apt-get install libmagick++-dev
and rmagick installed without problems.

This solution is after all more important than shown before, cuz it removes:
graphicsmagick-libmagick-dev-compat
but solves problem with (in 'bundle install'):
checking for wand/MagickWand.h... no
as show in my second post type in prompt:
sudo aptitude install libmagickwand-dev
At:
The following actions will resolve these dependencies:
Keep the following packages at their current version
1) libatk1.0-dev [Not Installed]
2) libcairo2-dev [Not Installed]
3) libexpat1-dev [Not Installed]
4) libgdk-pixbuf2.0-dev [Not Installed]
5) libglib2.0-dev [Not Installed]
6) libgraphviz-dev [Not Installed]
7) libgtk2.0-dev [Not Installed]
8) libmagickcore-dev [Not Installed]
9) libmagickwand-dev [Not Installed]
10) libpango1.0-dev [Not Installed]
11) librsvg2-dev [Not Installed]
Answer:
Accept this solution? [Y/n/q/?] n
In secound:
The following actions will resolve these dependencies:
Remove the following packages:
1 ) graphicsmagick-libmagick-dev-compat
Install the following packages:
2)libcairo-script-interpreter2 [1.10.2-6.1ubuntu2 (precise)]
[..]
Answer: "Y"
Accept this solution? [Y/n/q/?]
After task is done, U can easily run 'bundle install' in your project directory.

Try installing imagemagick and libmagickwand-dev together:
sudo apt-get install imagemagick libmagickwand-dev
This allows apt to resolve the dependencies properly. (tested on Ubuntu 12.04)

sudo apt-get install libmagick++-dev
rmagick installed success

Related

How to fix apt package contamination?

I have a linux distro "Pop_OS" installation that is contaminated by ubuntu. Specifically, its audio driver is broken.
When I try to use aptitude to force install "pulseaudio", it demonstrates the simple situation:
$ sudo aptitude install pulseaudio
The following NEW packages will be installed:
pulseaudio
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 913 kB of archives. After unpacking 4,674 kB will be used.
The following packages have unmet dependencies:
pop-desktop : Conflicts: pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 is to be installed
Conflicts: pulseaudio:i386 but it is not going to be installed
pipewire-alsa : Conflicts: pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 is to be installed
Conflicts: pulseaudio:i386 but it is not going to be installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) pulseaudio [Not Installed]
Accept this solution? [Y/n/q/?] n
*** No more solutions available ***
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) pulseaudio [Not Installed]
Obviously, the easy solution would be to uninstall pulseaudio but 1:15.99.1+dfsg1-1ubuntu2 (which cannot be found in upstream), and resolve the conflict. But aptitude shows that "*** No more solutions available ***"
So, why is aptitude so incapable of resolving such a simple conflict? And what tool is smart enough to do that?

apt-get is broken and can't install anything

My apt-get is totally broken and can't install anything. The output of 'apt-get install -f" is as follows:
# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
gnome-icon-theme : Depends: gtk-update-icon-cache
python3-cairo : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
python3-gdbm : Depends: python3 (>= 3.6) but 3.4.3-1 is installed
python3-reportlab-accel : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
rhythmbox : Depends: rhythmbox-data (= 3.1-1ubuntu3) but 3.4.1-2ubuntu5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
The output of 'sudo apt install python3' is in the picture:https://imgur.com/a/IbGK0
I have Googled any possible questions and tried any possible solutions but NO ONE worked for it.
Go to /var/log/dist-upgrade/apt.log and identify the packages that are broken. "apt-get remove" the packages, do release upgrade and then you should be able to reinstall them.
You can find more information here: https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel
This command resolved my error
sudo apt -f install
In my case I was behind a proxy, so I needed to run the following command:
sudo nano /etc/apt/apt.conf
And added the following lines:
Acquire::http::proxy "http://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::https::proxy "https://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::ftp::proxy "ftp://<user>:<password>#<proxy_host>:<proxy_port>/";

Phonetisaurus dependency issue

I am trying to install Phonetisaurus (using the Jasper installation instructions here). Unfortunatly I've run into a dependency issue I haven't been able to solve.
When I run the command sudo apt-get -t experimental install phonetisaurus m2m-aligner mitlm libfst-tools I get the following output:
Reading package lists... done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
m2m-aligner : Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
mitlm : Depends libmitlm0 (= 0.4.1-2) but it is not going to be installed
Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
phonetisaurus : Depends: libfst4 (>=1.5.3+r3) but it is not installable
Depends: libstdc++6 (>=5.2) but 4.9.2-10 is to be installed
Attempting to install libstdc++6 directly (either with sudo apt-get install libstdc++6 or sudo apt-get -f libstdc++6) leaves me with:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6 is already the newest version.
The following packages were automatically installed and are no longer required:
libboost-atomic1.55.0 libboost-filesystem1.55.0
libboost-program-options1.55.0 libboost-regex1.55.0 libboost-thread1.55.0
libcwiid1 libfftw3-single3 libjs-prettify libqscintilla2-11
libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4
libruby1.9.1 libruby1.9.1-dbg libscsynth1 libtcltk-ruby1.9.1 ri1.9.1
ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full ruby1.9.3
supercollider supercollider-common supercollider-ide supercollider-language
supercollider-server supercollider-supernova
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
Attempting to install libfst4 gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libfst4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libfst4' has no installation candidate
And attempting to install libmitlm0 gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmitlm0 : Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is to be installed
E: Unable to correct problems, you have held broken packages.
I feel like there is something I'm missing here but after a day of messing around with it I still can't figure it out. Any help/insight would be appreciated.
Thanks G10DRAS for providing the link.
This solution worked for me. First, I downloaded these files
sudo wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phonetisaurus/is2013-conversion.tgz
sudo wget http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.3.4.tar.gz
Then, untared the files
tar -xvf is2013-conversion.tgz
tar -xvf openfst-1.3.4.tar.gz
Finally, following next steps at: http://jasperproject.github.io/documentation/installation

rvm throws following error while installing ruby 2.0.0

I am getting the following error while installing the fresh ruby 2.0.0-p648 through rvm
$ rvm install 2.0.0
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.0.0-p648.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..bob password required for 'apt-get --quiet --yes update':
...........
Installing required packages: libgmp-dev....
Error running 'requirements_debian_libs_install libgmp-dev',
showing last 15 lines of /home/rank/.rvm/log/1467783851_ruby-2.0.0-p648/package_install_libgmp-dev.log
++ sudo -p '%p password required for '\''apt-get --no-install-recommends --yes install libgmp-dev'\'': ' apt-get --no-install-recommends --yes install libgmp-dev
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgmp-dev : Depends: libgmp10 (= 2:5.0.2+dfsg-2ubuntu1) but 2:5.1.3+dfsg-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
++ return 100
++ return 100
Requirements installation failed with status: 100.
Please help

Passenger installation error with Ruby under Debian squeeze

I'm trying to install passenger:
gem1.8 install passenger
But i'm getting the error:
Building native extensions. This could take a while... ERROR: Error
installing passenger: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb extconf.rb:8:in `require': no such
file to load -- mkmf (LoadError) from extconf.rb:8
Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7 for inspection. Results
logged to
/usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7/ext/fastthread/gem_make.out
So Now i've been told to install ruby1.8-dev but i have
a dependency:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
ruby1.8-dev : Depends: libc6-dev but it is not going to be installed
E: Broken packages
So i tried to install them both and got:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.7-18lenny7) but 2.11.2-10 is to be installed
So finally i tried to install issuing the command:
apt-get install ruby1.8-dev libc6-dev libc6
But i get the same error. I also tried with "apt-get -f"
What do i need to do?
I think you might be missing this:
sudo apt-get install build-essential

Resources