LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trying to install a Perl module (https://www.linuxquestions.org/questions/linux-software-2/trying-to-install-a-perl-module-674472/)

Otis99 10-05-2008 09:41 PM

Trying to install a Perl module
 
Hello, I have been really scratching my head on this and I figured I would pose the question to a message board in the hopes someone could help get me on track. I have a system running CentOS that I use for my home server. Mostly file/print stuff, DNS, mail, and a few other things. I am not exactly a Linux newbie, but I get in over my head sometimes.

I am trying to run a perl script that needs the WWW::Curl::Easy module. I've had experience with installing modules like this in the past so I fired up cpan and told it "install WWW::Curl::Easy". Upon issuing that command, I was greeted with a string of error messages.

The most relevant of those appeared to be:

Code:

Error:  Can't load '/root/.cpan/build/WWW-Curl-4.05/blib/arch/auto/WWW/Curl/Curl.so'
for module WWW::Curl: libcurl.so.4: cannot open shared object file:
No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

I'm not really sure what to make of that error. The file it is looking for (Curl.so) exists in the directory that it specified. I also have the file "libcurl.so.4" in /lib.

Really scratching my head here, I have curl installed in /usr/local/bin/ and it seems to work fine. I just don't know how to troubleshoot this error. Anyone out there able to help?

Mr. C. 10-05-2008 10:07 PM

This error is a tough one, and is misleading.

If the loader states that it cannot open a shared library, claiming that the file does not exist (and yet it does), it means that the binary is the wrong architecture, and no compatibility libraries exist to allow the load to succeed.

Generally this means you need ia32libs.

http://www.linuxquestions.org/questi...light=ia32libs.

Otis99 10-06-2008 12:29 PM

Quote:

Originally Posted by Mr. C. (Post 3301379)
Generally this means you need ia32libs.

http://www.linuxquestions.org/questi...light=ia32libs.

Sounds plausible, but after doing some searching both here and through Google, I was unable to find where I can download that package.

I tried various "yum search <xxxxx>" queries to see if it was in one of the repositories and was unable to find anything there either. I checked rpmfind.net which also did not turn anything up.

Am I doing something wrong here?

Mr. C. 10-06-2008 01:24 PM

I don't know your distro, and don't use Yum. Perhaps this will help:

http://www.google.com/search?q=ia32-libs

(note my misnaming - it is actually ia32-libs, with the dash.)

Otis99 10-06-2008 02:05 PM

Quote:

Originally Posted by Mr. C. (Post 3302044)
I don't know your distro, and don't use Yum. Perhaps this will help:

http://www.google.com/search?q=ia32-libs

(note my misnaming - it is actually ia32-libs, with the dash.)

I am using CentOS. It would appear that ia32-libs is a Debian package. The only references I could find were not .RPM packages, but rather .DEB packages. I tried several spellings of the word "ia32-libs" and other such variations.

You'll have to forgive me as I am not intimately familiar with the details of various package formats; is there a way to convert a Debian package to RPM? Or is there a package I can install on my current distribution that would allow me to install Debian packages?

Mr. C. 10-07-2008 02:17 AM

Right, sorry.

Let me be a little more clear - I had hoped my pointer would send you in the right direction, but see I've caused more confusion than help.

The issue is that the dynamic library loader cannot find a required shared library file to load. This means, either it does not exist, or does not exist in the expected locations. The "No such file or directory" error in this case is the loader indicating it cannot find the required shared library to load.

What you want to determine is which shared libraries are required by the Curl.so file:

ldd /root/.cpan/build/WWW-Curl-4.05/blib/arch/auto/WWW/Curl/Curl.so

Then, you need to locate those files. If any does not exist, it needs to be installed. The ia32-libs is often the solution on Debian/Ubuntu systems, as some required 32-bit compatibility libraries are included in that package. Show the output of the ldd command above, and indicate if you find the referenced shared libraries.

Another solution is to add the 64-bit library path to your shared library loader configuration file. Here's someone who has done the same thing (in the comments):

http://blog.revsys.com/2008/06/installing-apac.html

Otis99 10-07-2008 08:49 AM

Quote:

Originally Posted by Mr. C. (Post 3302639)
What you want to determine is which shared libraries are required by the Curl.so file:

ldd /root/.cpan/build/WWW-Curl-4.05/blib/arch/auto/WWW/Curl/Curl.so

Another solution is to add the 64-bit library path to your shared library loader configuration file. Here's someone who has done the same thing (in the comments):

http://blog.revsys.com/2008/06/installing-apac.html

Thank you for the command and for that link. I don't do a whole lot of compiling and whatnot (I guess automatic package installs using yum or just manually downloading RPMs have spoiled me) but knowing that "ldd" command and then putting in a symbolic link to the missing file did the trick.

As it turns out, the library libcurl.so.4 existed in /lib but not in /lib64. Making that link was the missing piece.

Appreciate the help, I am up and running now.


All times are GMT -5. The time now is 04:14 PM.