LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-15-2008, 11:39 AM   #1
Roosta21
Member
 
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Rep: Reputation: 15
RMagick shared libraries problem (ruby on rails setup)


I am attempting to get ruby on rails to working on my server. When i attempted to start the rails application through cpanel i get a following error

Code:
 following error** Daemonized, any open files are closed.  Look at log/mongrel.pid and log/mongrel.log for info.
** Starting Mongrel listening at 0.0.0.0:12001
** Starting Rails with production environment...
/usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/RMagick2.so: libMagickCore.so.1: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/RMagick2.so (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/rmagick-2.2.2/lib/RMagick.rb:11
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
         ... 24 levels...
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:16:in `load'
        from /usr/bin/mongrel_rails:16
but all the files shared files seem to be setup properly i think

Code:
lrwxrwxrwx  1 root root     33 May 15 16:29 MagickCore.so.1 -> /usr/local/lib/libMagickCore.so.1
-rw-r--r--  1 root root  58315 May 15 11:21 RMagick.rb
-rwxr-xr-x  1 root root 342899 May 15 11:21 RMagick2.so
lrwxrwxrwx  1 root root     31 May 15 17:01 libMagickCore.so -> /usr/local/lib/libMagickCore.so
lrwxrwxrwx  1 root root     33 May 15 16:39 libMagickCore.so.1 -> /usr/local/lib/libMagickCore.so.1
lrwxrwxrwx  1 root root     31 May 15 17:00 libMagickWand.so -> /usr/local/lib/libMagickWand.so
lrwxrwxrwx  1 root root     33 May 15 16:59 libMagickWand.so.1 -> /usr/local/lib/libMagickWand.so.1
drwxr-xr-x  2 root root   4096 May 15 11:21 rvg
Can anyone suggest a course of action?
 
Old 05-20-2008, 04:37 AM   #2
Roosta21
Member
 
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55

Original Poster
Rep: Reputation: 15
bump

Can anyone advise?
 
Old 05-23-2008, 04:16 AM   #3
lukerandall
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
I came across your question while looking for a solution to the same problem =) So far I've found the following advice:

before you compile ImageMagick set following Enviroment Variable:
LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"

With this option ImageMagick looks at /usr/local/lib for the libraries.

(see http://studio.imagemagick.org/piperm...ry/020785.html)

Hope that helps because I registered just so I could give you an answer =) But yeah, I just finished recompiling ImageMagick and it seems to have done the trick for me.

Be sure to gem install rmagick after re-installing ImageMagick so that it links to the new libraries
 
Old 08-17-2008, 02:41 PM   #4
goldenbough
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
How/where do you change this environment variable?

The installation instruction file says:

If you are willing to accept configure's default options, and build from
within the source directory, type:

./configure

and watch the configure script output to verify that it finds everything
that you think it should. If it does not, then adjust your environment
so that it does.

By default,

make install

will install the package's files in `/usr/local/bin', `/usr/local/lib', etc..
You can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PATH'. This is valuable in case you don't
have privileges to install under the default paths or if you want to install
in the system directories instead.

So I assume you would type in ./configure (path), but I don't understand exactly how to format this. If I want to put in in usr/local/lib, what would I type?



Also I want to start over. The instruction file states:

* Remove everything in the build directory created by 'configure' and 'make'.
This is useful if you want to start over from scratch.

make distclean

I ran:
cd ImageMagick-6.4.2
make distclean

and get the error:
make: *** No rule to make target `distclean'. Stop.
 
Old 08-18-2008, 05:57 AM   #5
lukerandall
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Hi goldenbough

You can type

Code:
export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
at your promt to set the LDFLAGS. Remember that this will only be set for that session, so as soon as you log out the setting will be lost. Likewise, if you open a new tab or so forth it will not have this setting.

To install to /usr/local you'd type

Code:
./configure --prefix=/usr/local
You more than likely WOULDN'T want to install it to /usr/local/lib (I'm guessing you just used that as an example, but just want to make sure you realise that).

I'm not sure why make distclean didn't work for you. Perhaps you haven't run make yet (so there is nothing to clean up). Just a guess though. However - and I'm subject to correction here - I don't believe it is necessary for you to run it, as when you run ./configure and make, they will simply overwrite your old files, meaning that it's really irrelevant whether you run make distclean before or not.

Hope that helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP v Ruby/Ruby on Rails Neko_D Linux - General 4 02-08-2007 11:56 PM
MythTV Setup: error while loading shared libraries: libjack.so.0 djgerbavore Slackware 4 10-09-2006 06:12 PM
Getting started with Ruby on Rails Ephracis Linux - Server 1 09-24-2006 03:40 PM
LXer: Ruby on Rails LXer Syndicated Linux News 0 02-16-2006 04:16 PM
LXer: Ruby off the Rails LXer Syndicated Linux News 0 12-24-2005 04:31 PM


All times are GMT -5. The time now is 01:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration