Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 2014-02-14
Medium Priority
Last Modified: 2014-03-15
/usr/bin/ld: skipping incompatible /usr/local/perl-5.8.9/lib/5.8.9/i386-thread-multi/CORE/ when searching for -lperl
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
Question by:ittechlab
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2

Author Comment

ID: 39859731
[root@rhel5 postgresql-8.2.10]# ld -lperl --verbose

attempt to open /usr/x86_64-redhat-linux/lib64/ failed
attempt to open /usr/x86_64-redhat-linux/lib64/libperl.a failed
attempt to open /usr/local/lib64/ failed
attempt to open /usr/local/lib64/libperl.a failed
attempt to open /lib64/ failed
attempt to open /lib64/libperl.a failed
attempt to open /usr/lib64/ failed
attempt to open /usr/lib64/libperl.a failed
attempt to open /usr/x86_64-redhat-linux/lib/ failed
attempt to open /usr/x86_64-redhat-linux/lib/libperl.a failed
attempt to open /usr/lib64/ failed
attempt to open /usr/lib64/libperl.a failed
attempt to open /usr/local/lib/ failed
attempt to open /usr/local/lib/libperl.a failed
attempt to open /lib/ failed
attempt to open /lib/libperl.a failed
attempt to open /usr/lib/ failed
attempt to open /usr/lib/libperl.a failed
ld: cannot find -lperl
LVL 14

Accepted Solution

comfortjeanius earned 999 total points
ID: 39859828
Did try to create a link???

sudo ln -s<version number>

Open in new window


Author Comment

ID: 39859870
I am trying to set the following and trying to execute the following command. what happens is i am loosing the shell. How do i fix this in the scripting.

./configure --prefix=/pgarc/psql --with-perl

##setting up environment based on 32bit
        export PERL5LIB=/usr/lib/perl5
        export CC="gcc -m32"
        export LD="ld -melf_i386"
        export CFLAGS="-m32"
        export LDFLAGS="-m32"
        setarch i386
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.


Author Comment

ID: 39859942
sudo -u postgres -H sh -c "cd /usr/local/src/postgresql-8.2.10;export PERL5LIB=/usr/lib/perl5;export CC="gcc -m32";export LD="ld -melf_i386";export CFLAGS="-m32";export LDFLAGS="-m32";setarch i386;./configure --prefix=/pgarc/psql --with-perl"

when i run this in the script.  its ending up with the following output instead of executing ./configure

+ sudo -u postgres -H sh -c 'cd /usr/local/src/postgresql-8.2.10;export PERL5LIB=/usr/lib/perl5;export CC=gcc' '-m32;export LD=ld' '-melf_i386;export CFLAGS=-m32;export LDFLAGS=-m32;setarch i386;./configure --prefix=/pgarc/psql --with-perl'
LVL 14

Assisted Solution

comfortjeanius earned 999 total points
ID: 39859989
What are you trying to configure and what Linux distribution do you have?
LVL 35

Assisted Solution

by:Duncan Roe
Duncan Roe earned 501 total points
ID: 39874984
The most likely cause of the original error message is that /usr/local/perl-5.8.9/lib/5.8.9/i386-thread-multi/CORE/ is a 32-bit library but you are trying to build a 64-bit application. You need to install the 64-bit perl library
LVL 35

Expert Comment

by:Duncan Roe
ID: 39874996
Or tell ld to do a 32-bit load

Featured Post

Implementing Azure Infrastructure Exam 70-533

This course is designed to familiarize and instruct students in the content that is covered by Microsoft Exam 70-533, Implementing Microsoft Azure Solutions. It focuses on all the November 2016 objective domain topics.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question