Re: Missing uuid_generate_v1()

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Missing uuid_generate_v1()
Date: 2010-10-07 01:33:20
Message-ID: AANLkTimz9E1a_cLe_FmO-4C_BVy9DHgjBLU9oFaiZAS+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 6, 2010 at 6:27 PM, Mike Christensen <mike(at)kitchenpc(dot)com> wrote:
> On Wed, Oct 6, 2010 at 6:25 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
>> On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike(at)kitchenpc(dot)com> wrote:
>>> My production server is running Postgres 9.0 on Ubuntu Server, and I'm
>>> getting some errors in sprocs that call uuid_generate_v1()..  This is
>>> because the function is missing.
>>>
>>> On my Windows box, this function would automatically be installed as
>>> part of the database..  If I try to create the function with:
>>>
>>>
>>> CREATE OR REPLACE FUNCTION uuid_generate_v1()
>>>  RETURNS uuid AS
>>> '$libdir/uuid-ossp', 'uuid_generate_v1'
>>>  LANGUAGE c VOLATILE STRICT
>>>  COST 1;
>>>
>>> I get:
>>>
>>> ERROR: could not load library
>>> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
>>> cannot open shared object file: No such file or directory
>>> SQL state: 58P01
>>>
>>> How do I get this working under Linux?  Thanks!!
>>
>> Have you installed the contrib package?  Often there's an associated
>> .sql file to turn a contrib module on in a given database.  It'll be
>> in something like /usr/share usually
>
> Yup, I tried that - Here's what I get:
>
> # ./psql -d ****** -U ****** -f
> /opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql
> Password for user root:
> SET
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:9:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:14:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:19:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:24:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:29:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:34:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:39:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:44:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:49:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
> psql:/opt/PostgreSQL/9.0/share/postgresql/contrib/uuid-ossp.sql:54:
> ERROR:  could not load library
> "/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so": libuuid.so.16:
> cannot open shared object file: No such file or directory
>

Oh btw, the file does actually exist.. Maybe it's missing some
permission or something?

ls -l /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
-rwxr-xr-x 1 root daemon 12648 Oct 3 20:03
/opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-10-07 01:42:14 Re: Missing uuid_generate_v1()
Previous Message Mike Christensen 2010-10-07 01:27:18 Re: Missing uuid_generate_v1()