Rails 5 - How to fix rmagick -v '2.16.0' issue?
up vote
0
down vote
favorite
In rails 5.0.0, I am trying to run one application but bundle install is not working, it showing an error like
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0/ext/RMagick
/home/XYZ/shruthir/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20171012-7699-f2np4k.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** 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.
...
Gem files will remain installed in /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0 for inspection.
Results logged to /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.
In Gemfile:
rmagick
If I run gem install rmagick -v '2.16.0'
then it shows an same error like
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
This issue is searched in google and trying to fix by running sudo apt-get install imagemagick libmagickwand-dev
but again it shows an error like
Err:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1
500 Internal Error [IP: 91.189.88.161 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/p/pcre3/libpcre3-dev_8.38-3.1_amd64.deb 500 Internal Error [IP: 91.189.88.161 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
sudo apt-get update
logs are like
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:7 https://repo.skype.com/deb stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:9 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Hit:10 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease
Hit:11 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Hit:6 http://screenshots.getdeb.net xenial-getdeb InRelease
Hit:12 https://download.sublimetext.com apt/stable/ InRelease
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 560 kB in 3s (146 kB/s)
Reading package lists... Done
Please help me to fix this rmagick
issue.
ruby-on-rails ruby imagemagick rmagick
add a comment |
up vote
0
down vote
favorite
In rails 5.0.0, I am trying to run one application but bundle install is not working, it showing an error like
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0/ext/RMagick
/home/XYZ/shruthir/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20171012-7699-f2np4k.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** 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.
...
Gem files will remain installed in /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0 for inspection.
Results logged to /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.
In Gemfile:
rmagick
If I run gem install rmagick -v '2.16.0'
then it shows an same error like
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
This issue is searched in google and trying to fix by running sudo apt-get install imagemagick libmagickwand-dev
but again it shows an error like
Err:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1
500 Internal Error [IP: 91.189.88.161 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/p/pcre3/libpcre3-dev_8.38-3.1_amd64.deb 500 Internal Error [IP: 91.189.88.161 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
sudo apt-get update
logs are like
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:7 https://repo.skype.com/deb stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:9 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Hit:10 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease
Hit:11 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Hit:6 http://screenshots.getdeb.net xenial-getdeb InRelease
Hit:12 https://download.sublimetext.com apt/stable/ InRelease
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 560 kB in 3s (146 kB/s)
Reading package lists... Done
Please help me to fix this rmagick
issue.
ruby-on-rails ruby imagemagick rmagick
1
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
As your error suggest, have you triedsudo apt-get update
? Try that once which update your package list.
– jon snow
Oct 12 '17 at 8:57
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In rails 5.0.0, I am trying to run one application but bundle install is not working, it showing an error like
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0/ext/RMagick
/home/XYZ/shruthir/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20171012-7699-f2np4k.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** 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.
...
Gem files will remain installed in /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0 for inspection.
Results logged to /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.
In Gemfile:
rmagick
If I run gem install rmagick -v '2.16.0'
then it shows an same error like
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
This issue is searched in google and trying to fix by running sudo apt-get install imagemagick libmagickwand-dev
but again it shows an error like
Err:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1
500 Internal Error [IP: 91.189.88.161 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/p/pcre3/libpcre3-dev_8.38-3.1_amd64.deb 500 Internal Error [IP: 91.189.88.161 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
sudo apt-get update
logs are like
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:7 https://repo.skype.com/deb stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:9 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Hit:10 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease
Hit:11 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Hit:6 http://screenshots.getdeb.net xenial-getdeb InRelease
Hit:12 https://download.sublimetext.com apt/stable/ InRelease
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 560 kB in 3s (146 kB/s)
Reading package lists... Done
Please help me to fix this rmagick
issue.
ruby-on-rails ruby imagemagick rmagick
In rails 5.0.0, I am trying to run one application but bundle install is not working, it showing an error like
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0/ext/RMagick
/home/XYZ/shruthir/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20171012-7699-f2np4k.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for outdated ImageMagick version (<= 6.4.9)... *** 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.
...
Gem files will remain installed in /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/gems/rmagick-2.16.0 for inspection.
Results logged to /home/XYZ/shruthir/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.
In Gemfile:
rmagick
If I run gem install rmagick -v '2.16.0'
then it shows an same error like
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
This issue is searched in google and trying to fix by running sudo apt-get install imagemagick libmagickwand-dev
but again it shows an error like
Err:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1
500 Internal Error [IP: 91.189.88.161 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/p/pcre3/libpcre3-dev_8.38-3.1_amd64.deb 500 Internal Error [IP: 91.189.88.161 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
sudo apt-get update
logs are like
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu xenial InRelease
Hit:7 https://repo.skype.com/deb stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:9 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Hit:10 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease
Hit:11 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial InRelease
Hit:6 http://screenshots.getdeb.net xenial-getdeb InRelease
Hit:12 https://download.sublimetext.com apt/stable/ InRelease
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 560 kB in 3s (146 kB/s)
Reading package lists... Done
Please help me to fix this rmagick
issue.
ruby-on-rails ruby imagemagick rmagick
ruby-on-rails ruby imagemagick rmagick
edited Oct 16 '17 at 11:06
asked Oct 12 '17 at 5:51
Shruthi R
72011238
72011238
1
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
As your error suggest, have you triedsudo apt-get update
? Try that once which update your package list.
– jon snow
Oct 12 '17 at 8:57
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26
add a comment |
1
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
As your error suggest, have you triedsudo apt-get update
? Try that once which update your package list.
– jon snow
Oct 12 '17 at 8:57
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26
1
1
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
As your error suggest, have you tried
sudo apt-get update
? Try that once which update your package list.– jon snow
Oct 12 '17 at 8:57
As your error suggest, have you tried
sudo apt-get update
? Try that once which update your package list.– jon snow
Oct 12 '17 at 8:57
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Latest Approach
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagick
Approach 1
rmagick gem is not able find PKG_CONFIG_PATH while installing. We need to tell where the path for the ImageMagick exists. It's always better to add in the bash.
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
Approach 2
If the above solution doesn't work then try this
You just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture)
try this
locate /usr/lib64/pkgconfig -name MagickCore.pc
or
find /usr/lib64/pkgconfig -name MagickCore.pc
If the file is there you just have to install rmagick with this command:
PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
After trying this again I am getting an error likeCan't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46702305%2frails-5-how-to-fix-rmagick-v-2-16-0-issue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Latest Approach
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagick
Approach 1
rmagick gem is not able find PKG_CONFIG_PATH while installing. We need to tell where the path for the ImageMagick exists. It's always better to add in the bash.
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
Approach 2
If the above solution doesn't work then try this
You just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture)
try this
locate /usr/lib64/pkgconfig -name MagickCore.pc
or
find /usr/lib64/pkgconfig -name MagickCore.pc
If the file is there you just have to install rmagick with this command:
PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
After trying this again I am getting an error likeCan't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
|
show 3 more comments
up vote
0
down vote
Latest Approach
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagick
Approach 1
rmagick gem is not able find PKG_CONFIG_PATH while installing. We need to tell where the path for the ImageMagick exists. It's always better to add in the bash.
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
Approach 2
If the above solution doesn't work then try this
You just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture)
try this
locate /usr/lib64/pkgconfig -name MagickCore.pc
or
find /usr/lib64/pkgconfig -name MagickCore.pc
If the file is there you just have to install rmagick with this command:
PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
After trying this again I am getting an error likeCan't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
|
show 3 more comments
up vote
0
down vote
up vote
0
down vote
Latest Approach
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagick
Approach 1
rmagick gem is not able find PKG_CONFIG_PATH while installing. We need to tell where the path for the ImageMagick exists. It's always better to add in the bash.
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
Approach 2
If the above solution doesn't work then try this
You just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture)
try this
locate /usr/lib64/pkgconfig -name MagickCore.pc
or
find /usr/lib64/pkgconfig -name MagickCore.pc
If the file is there you just have to install rmagick with this command:
PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
Latest Approach
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagick
Approach 1
rmagick gem is not able find PKG_CONFIG_PATH while installing. We need to tell where the path for the ImageMagick exists. It's always better to add in the bash.
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-7/lib/pkgconfig
Approach 2
If the above solution doesn't work then try this
You just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture)
try this
locate /usr/lib64/pkgconfig -name MagickCore.pc
or
find /usr/lib64/pkgconfig -name MagickCore.pc
If the file is there you just have to install rmagick with this command:
PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick
edited Oct 16 '17 at 11:56
answered Oct 12 '17 at 13:22
Aniket Shivam Tiwari
1,428725
1,428725
After trying this again I am getting an error likeCan't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
|
show 3 more comments
After trying this again I am getting an error likeCan't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
After trying this again I am getting an error like
Can't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
After trying this again I am getting an error like
Can't install RMagick 2.16.0. Can't find MagickWand.h.
– Shruthi R
Oct 13 '17 at 5:57
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
These are already tried but same issue is happening.
– Shruthi R
Oct 13 '17 at 7:25
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
I have updated my answer once again please check
– Aniket Shivam Tiwari
Oct 13 '17 at 7:43
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
did the above solution work or not?
– Aniket Shivam Tiwari
Oct 13 '17 at 8:48
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
No. Same issue is happening.
– Shruthi R
Oct 16 '17 at 6:28
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46702305%2frails-5-how-to-fix-rmagick-v-2-16-0-issue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
try this sudo apt-get install libmagickwand-dev
– Aniket Shivam Tiwari
Oct 12 '17 at 7:29
As your error suggest, have you tried
sudo apt-get update
? Try that once which update your package list.– jon snow
Oct 12 '17 at 8:57
Already tried all these commands but same issue exists.
– Shruthi R
Oct 13 '17 at 7:26