2

I'm getting a strange linker error that I don't completely understand while attempting to install postgresql on OSX.

I've installed Postgres via Brew and now I'm trying to get my Django app up and running. I've added the postgres directory to my path. I'm running OSX Yosemite.

When I run the following command:

pip install psycopg2

I get this error:

ld: illegal text reloc in '_init_psycopg' to '_lobjectType' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1

I'm at a loss where to go from here and my searches for this type of error has lead me no where. Any help would be amazing.

Thanks.

Imq
  • 165
  • 8
  • Did you try this Might be issue due to xcode as well http://stackoverflow.com/questions/26288042/error-installing-psycopg2-library-not-found-for-lssl – Ravi Sethia Sep 28 '16 at 20:28

1 Answers1

0

Turns out I had a couple versions of Postgres installed. I had to remove the old one and make sure the pg_config that was found in the PATH was the most recent one. As soon as I made sure the pg_config was the proper one, this error went away.

Imq
  • 165
  • 8