Thread: Redhat 6.0 Link Error: Undefined Reference to crypt

Redhat 6.0 Link Error: Undefined Reference to crypt

From
"Klein, Robert"
Date:
I'm trying to compile a program on Redhat 6.0 with the Postgres 6.4 the came
with it.  
I get the following link error:
/usr/lib/libpq.so: Undefined reference to "crypt"
Does postgres need a difference libc or glibc?  Redhat comes with:
libc 5.3.13
glibc 2.1.1

Thanks!

Rob Klein
System Administrator
Ober, Kaler, Grimes and Shriver
120 East Baltimore St
Baltimore, MD 21202



Re: [SQL] Redhat 6.0 Link Error: Undefined Reference to crypt

From
Tom Lane
Date:
"Klein, Robert" <rvklein@ober.com> writes:
> I'm trying to compile a program on Redhat 6.0 with the Postgres 6.4 the came
> with it.  
> I get the following link error:
> /usr/lib/libpq.so: Undefined reference to "crypt"

You need to add -lcrypt to your link command, probably.  On some
platforms crypt() is part of regular libc, on some it comes in
a separate libcrypt library...
        regards, tom lane


Re: [SQL] Redhat 6.0 Link Error: Undefined Reference to crypt

From
De Moudt Walter
Date:
Robert, 
I got the same message after running X. I re-installed my RedHat without
postgreSQL, created a user postgres, downloaded the latest version of
postgresql (a couple of days ago)- redhat 6.0 RPM version, and
everything seems to work well (for) now...

Hope it helps,
ps. The updated libraries when installing both the server and client
package are :

files:
libecpg.so.3.0.0
libpq.so.2.0
libpq++.so.3.0
links:
libecpg.so
libecpg.so.3
libpq.so
libpq.so.2
libpq++.so
libpq++.so.3

All residing in /usr/lib.

So if you don't install the development packages, it's not that
difficult to restore the links and files after un-installing Postgres.
That is, if you take notes before installing it... :-)

Wish you luck,

De Moudt Walter
"Klein, Robert" wrote:
> 
> I'm trying to compile a program on Redhat 6.0 with the Postgres 6.4 the came
> with it.
> I get the following link error:
> /usr/lib/libpq.so: Undefined reference to "crypt"
> Does postgres need a difference libc or glibc?  Redhat comes with:
> libc 5.3.13
> glibc 2.1.1
> 
> Thanks!
> 
> Rob Klein
> System Administrator
> Ober, Kaler, Grimes and Shriver
> 120 East Baltimore St
> Baltimore, MD 21202
> 
> ************