OS is openSUSE 12.1, PostgreSQL - 9.1, PostGIS - 2.0. Postgre/PostGIS are installed from Application:Geo repository.

After recent updates when I try to connect to my database I get the following error:

    ERROR:  could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so":
 /usr/lib/postgresql91/lib64/postgis-2.0.so: undefined symbol: pj_get_spheroid_defn

I searched the web for this error (hint-1, hint-2) and seems that it may have something to do with ld.so.config (or ldconfig command). But I can't figure out what I have to do in my case.

  • 2
    a recent version of proj (>= 4.8) is needed. What does proj --version and/or ldd `which proj` show?
    – Mike T
    Commented Dec 13, 2012 at 1:43
  • @MikeToews, my proj version is 4.7.1. Looks like I need to update it. Commented Dec 17, 2012 at 16:19
  • I have installed proj 4.8 from their official site. But still when I do proj --verion it shows me > Rel. 4.7.1, 23 September 2009 How can I upgrade it to 4.8. I am out of any ideas :( I am using Ubuntu 12.4 Thanks Mo.
    – mmrs151
    Commented May 17, 2013 at 15:53

3 Answers 3


Thanks to MikeToews I was able to fix this issue. PostGIS 2.0 in openSUSE depends on libproj0 and its version must be >=4.8. Somehow package manager didn't notify me about new version available for the libproj0 so I checked its newer version manually via Yast in "Versions" tab. After an update I'm able to operate database normally.

  • this is not true. Commented Nov 20, 2017 at 3:11

I don't believe the chosen answer has anything to do with the problem,

What happened

  1. Postgre/PostGIS are installed from Application:Geo repository.
  2. OS is openSUSE

You installed a new version of PostGIS built against a version of proj you don't have. Your proj is likely provided by OpenSUSE. You need to install the version of proj from the Application:Geo repository, or the version of PostGIS from the mainline OpenSUSE repository. This is a dependency-client mismatch. You should file a bug in SUSE if the problem persists.

It's not that PostGIS doesn't work on old versions of proj. It's that SUSE is ONLY building PostGIS against newer versions so you require one.

PostGIS and old proj

From a bug report filed two years ago,

So basically PostGIS can work also with older Proj4 versions, but it needs to know at compile time.

It then looks like watsonta's binary was built against Proj 4.8 but was running against a previous version. Very likely a bug in the binary package, or its dependencies (proj-4.8+ being a dependency of the binary postgis as built by the packager).

I think that's the problem. You built against a newer versoin of proj than you have installed. Upgrading the install to the version you built agianst is just one way to fix the problem.

You can see that function called here and it's protected by an if.


If that's not working you've got another problem. It's provided by the build system in a 10 year old macro


mmrs151. To upgrade from proj version 4.7 to proj 4.8 on Ubuntu 13.04. At least it helped me solve the same problem.

$ sudo apt-get upgrade libproj-dev

  • Could you elaborate a bit on your answer? How does it solve the OP's problem?
    – Martin
    Commented Mar 20, 2014 at 11:24
  • 2
    This answer is useless - openSUSE doesn't use apt. Commented Mar 20, 2014 at 11:26
  • The answer was meant for mmrs151. Commented Mar 20, 2014 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.