Thread: Missing uuid_generate_v1()

Missing uuid_generate_v1()

From
Mike Christensen
Date:
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!!

Mike

Re: Missing uuid_generate_v1()

From
Scott Marlowe
Date:
On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.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

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.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

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:27 PM, Mike Christensen <mike@kitchenpc.com> wrote:
> On Wed, Oct 6, 2010 at 6:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>> On Wed, Oct 6, 2010 at 7:18 PM, Mike Christensen <mike@kitchenpc.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

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> 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

What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
say?

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> 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
>
> What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
> say?
>
>                        regards, tom lane
>

# ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
    linux-vdso.so.1 =>  (0x00007fff5a5ff000)
    libuuid.so.16 => not found
    libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
>> say?

> # ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
>     linux-vdso.so.1 =>  (0x00007fff5a5ff000)
>     libuuid.so.16 => not found
>     libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
>     /lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)

So you don't have libuuid installed.  Go forth and get it ...

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> On Wed, Oct 6, 2010 at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> What does "ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so"
>>> say?
>
>> # ldd /opt/PostgreSQL/9.0/lib/postgresql/uuid-ossp.so
>>       linux-vdso.so.1 =>  (0x00007fff5a5ff000)
>>       libuuid.so.16 => not found
>>       libc.so.6 => /lib/libc.so.6 (0x00007f5398e08000)
>>       /lib64/ld-linux-x86-64.so.2 (0x00007f5399392000)
>
> So you don't have libuuid installed.  Go forth and get it ...
>
>                        regards, tom lane
>

What's the easiest way to do that?  Is there a .bin file I can run?
Or a URL I can wget?  Thanks!

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So you don't have libuuid installed. �Go forth and get it ...

> What's the easiest way to do that?  Is there a .bin file I can run?
> Or a URL I can wget?  Thanks!

I'd expect it'd be available as a standard package for your platform ---
see yum or apt-get or whatever you use there.

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> So you don't have libuuid installed.  Go forth and get it ...
>
>> What's the easiest way to do that?  Is there a .bin file I can run?
>> Or a URL I can wget?  Thanks!
>
> I'd expect it'd be available as a standard package for your platform ---
> see yum or apt-get or whatever you use there.
>
>                        regards, tom lane
>

Ok I just installed anything that looked relevant:

apt-get install libuuid1 uuid-dev uuid-runtime

It said libuuid1 was already installed, but installed the other two.
However, libuuid.so.16 is still "not found"..

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> However, libuuid.so.16 is still "not found"..

So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
may be)?

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> However, libuuid.so.16 is still "not found"..
>
> So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
> may be)?
>
>                        regards, tom lane
>

/usr/lib# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22  2010 libuuid.a
lrwxrwxrwx 1 root root    21 Oct  7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0



/usr/lib64# ls -l libuuid*
-rw-r--r-- 1 root root 28068 Mar 22  2010 libuuid.a
lrwxrwxrwx 1 root root    21 Oct  7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Mike Christensen <mike@kitchenpc.com> writes:
>>> However, libuuid.so.16 is still "not found"..
>>
>> So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
>> may be)?

> /usr/lib# ls -l libuuid*
> -rw-r--r-- 1 root root 28068 Mar 22  2010 libuuid.a
> lrwxrwxrwx 1 root root    21 Oct  7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0

Well, apparently the copy of Postgres you have was built on a different
platform than you're using ... one where libuuid is thought to be at
major version 16.  I don't know where that would've been exactly ---
on my Fedora box, libuuid is libuuid.so.1.3.0 also.

You need to get those version numbers to match up, either by finding a
version of PG that *was* built on your platform, or by rebuilding PG
locally.

I have heard of people hacking this type of situation by creating a
symlink from one library version to the other, but that seems pretty
risky to me.

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Adrian Klaver
Date:
On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:
> On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Mike Christensen <mike@kitchenpc.com> writes:
> >> On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>> So you don't have libuuid installed.  Go forth and get it ...
> >>
> >> What's the easiest way to do that?  Is there a .bin file I can run?
> >> Or a URL I can wget?  Thanks!
> >
> > I'd expect it'd be available as a standard package for your platform ---
> > see yum or apt-get or whatever you use there.
> >
> >                        regards, tom lane
>
> Ok I just installed anything that looked relevant:
>
> apt-get install libuuid1 uuid-dev uuid-runtime
>
> It said libuuid1 was already installed, but installed the other two.
> However, libuuid.so.16 is still "not found"..

What version of Ubuntu and libuuid are you running?  The stock version of uuid
that came with my Ubuntu 8.04 does not work. I downloaded a newer
version(1.6.2) from:
http://www.ossp.org/pkg/lib/uuid/
I compiled it and Postgres was happy.

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 7:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> On Wed, Oct 6, 2010 at 6:59 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Mike Christensen <mike@kitchenpc.com> writes:
>>>> However, libuuid.so.16 is still "not found"..
>>>
>>> So have you got libuuid.anything in /usr/lib (or /usr/lib64 as the case
>>> may be)?
>
>> /usr/lib# ls -l libuuid*
>> -rw-r--r-- 1 root root 28068 Mar 22  2010 libuuid.a
>> lrwxrwxrwx 1 root root    21 Oct  7 01:54 libuuid.so -> /lib/libuuid.so.1.3.0
>
> Well, apparently the copy of Postgres you have was built on a different
> platform than you're using ... one where libuuid is thought to be at
> major version 16.  I don't know where that would've been exactly ---
> on my Fedora box, libuuid is libuuid.so.1.3.0 also.
>
> You need to get those version numbers to match up, either by finding a
> version of PG that *was* built on your platform, or by rebuilding PG
> locally.
>
> I have heard of people hacking this type of situation by creating a
> symlink from one library version to the other, but that seems pretty
> risky to me.
>
>                        regards, tom lane
>

I got it working..

I just built libuuid 1.6 from the source and installed that :)

BTW, I installed Postgres 9 from the .bin file downloadable at
enterprisedb.com..

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 7:21 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
> On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:
>> On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> > Mike Christensen <mike@kitchenpc.com> writes:
>> >> On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> >>> So you don't have libuuid installed.  Go forth and get it ...
>> >>
>> >> What's the easiest way to do that?  Is there a .bin file I can run?
>> >> Or a URL I can wget?  Thanks!
>> >
>> > I'd expect it'd be available as a standard package for your platform ---
>> > see yum or apt-get or whatever you use there.
>> >
>> >                        regards, tom lane
>>
>> Ok I just installed anything that looked relevant:
>>
>> apt-get install libuuid1 uuid-dev uuid-runtime
>>
>> It said libuuid1 was already installed, but installed the other two.
>> However, libuuid.so.16 is still "not found"..
>
> What version of Ubuntu and libuuid are you running?  The stock version of uuid
> that came with my Ubuntu 8.04 does not work. I downloaded a newer
> version(1.6.2) from:
> http://www.ossp.org/pkg/lib/uuid/
> I compiled it and Postgres was happy.
>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>

Yup that's exactly what I did..  I'm on 10.04, which doesn't have
libuuid 1.6 in the software repository, go figure..

I greatly appreciate everyone's help..

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:

On Wed, Oct 6, 2010 at 7:24 PM, Mike Christensen <mike@kitchenpc.com> wrote:
> On Wed, Oct 6, 2010 at 7:21 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
>> On Wednesday 06 October 2010 6:56:22 pm Mike Christensen wrote:
>>> On Wed, Oct 6, 2010 at 6:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> > Mike Christensen <mike@kitchenpc.com> writes:
>>> >> On Wed, Oct 6, 2010 at 6:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> >>> So you don't have libuuid installed.  Go forth and get it ...
>>> >>
>>> >> What's the easiest way to do that?  Is there a .bin file I can run?
>>> >> Or a URL I can wget?  Thanks!
>>> >
>>> > I'd expect it'd be available as a standard package for your platform ---
>>> > see yum or apt-get or whatever you use there.
>>> >
>>> >                        regards, tom lane
>>>
>>> Ok I just installed anything that looked relevant:
>>>
>>> apt-get install libuuid1 uuid-dev uuid-runtime
>>>
>>> It said libuuid1 was already installed, but installed the other two.
>>> However, libuuid.so.16 is still "not found"..
>>
>> What version of Ubuntu and libuuid are you running?  The stock version of uuid
>> that came with my Ubuntu 8.04 does not work. I downloaded a newer
>> version(1.6.2) from:
>> http://www.ossp.org/pkg/lib/uuid/
>> I compiled it and Postgres was happy.
>>
>> --
>> Adrian Klaver
>> adrian.klaver@gmail.com
>>
>
> Yup that's exactly what I did..  I'm on 10.04, which doesn't have
> libuuid 1.6 in the software repository, go figure..
>
> I greatly appreciate everyone's help..
>

Oh BTW, in case anyone stumbles across this thread archived in the
future, once you do this, be sure to do a postgres restart, or PG
apparently just crashes and burns when you call uuid_generate_v1() :)

Once I restarted the server, I could generate UUIDs all day long..

Mike

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> Yup that's exactly what I did..  I'm on 10.04, which doesn't have
> libuuid 1.6 in the software repository, go figure..

Oh ... we're in package-naming hell, is where we are.  Poking around
some more on my Fedora 13 box, I find I have two different, similarly
named packages:

$ rpm -qa | grep uuid
uuid-1.6.1-11.fc13.x86_64
libuuid-2.17.2-8.fc13.x86_64
uuid-devel-1.6.1-11.fc13.x86_64
libuuid-devel-2.17.2-8.fc13.x86_64
$ rpm -ql uuid-1.6.1-11.fc13.x86_64
/usr/bin/uuid
/usr/lib64/libossp-uuid.so.16
/usr/lib64/libossp-uuid.so.16.0.21
... and some doc files ...
$ rpm -ql libuuid-2.17.2-8.fc13.x86_64
/lib64/libuuid.so.1
/lib64/libuuid.so.1.3.0

The file you actually want, on Fedora (and, I bet, on Ubuntu),
is libossp-uuid.so.16.  But apparently EDB's package was built on some
platform where uuid's library is installed as just "libuuid.so.16".
Maybe they used a homebuilt copy instead of an official platform
distribution?

If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
to that instead of carrying a separate file.

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> Yup that's exactly what I did..  I'm on 10.04, which doesn't have
>> libuuid 1.6 in the software repository, go figure..
>
> Oh ... we're in package-naming hell, is where we are.  Poking around
> some more on my Fedora 13 box, I find I have two different, similarly
> named packages:
>
> $ rpm -qa | grep uuid
> uuid-1.6.1-11.fc13.x86_64
> libuuid-2.17.2-8.fc13.x86_64
> uuid-devel-1.6.1-11.fc13.x86_64
> libuuid-devel-2.17.2-8.fc13.x86_64
> $ rpm -ql uuid-1.6.1-11.fc13.x86_64
> /usr/bin/uuid
> /usr/lib64/libossp-uuid.so.16
> /usr/lib64/libossp-uuid.so.16.0.21
> ... and some doc files ...
> $ rpm -ql libuuid-2.17.2-8.fc13.x86_64
> /lib64/libuuid.so.1
> /lib64/libuuid.so.1.3.0
>
> The file you actually want, on Fedora (and, I bet, on Ubuntu),
> is libossp-uuid.so.16.  But apparently EDB's package was built on some
> platform where uuid's library is installed as just "libuuid.so.16".
> Maybe they used a homebuilt copy instead of an official platform
> distribution?
>
> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
> to that instead of carrying a separate file.
>
>                        regards, tom lane
>

So now what you're saying is if it's not broke, fix it till it is :)

Re: Missing uuid_generate_v1()

From
Tom Lane
Date:
Mike Christensen <mike@kitchenpc.com> writes:
> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
>> to that instead of carrying a separate file.

> So now what you're saying is if it's not broke, fix it till it is :)

Well, it's hard to argue with that position ;-).  But I'll try anyway:
the platform-provided version of the library will be updated for bug
fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
you remember to do it.  Eventually that's gonna bite ya.

Of course the best fix would be for EDB to ship a build of Postgres
that actually follows the platform-standard naming convention for this
library.  I'm still wondering why they're linking to libuuid.so.
Dave?

            regards, tom lane

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 7:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
>>> to that instead of carrying a separate file.
>
>> So now what you're saying is if it's not broke, fix it till it is :)
>
> Well, it's hard to argue with that position ;-).  But I'll try anyway:
> the platform-provided version of the library will be updated for bug
> fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
> you remember to do it.  Eventually that's gonna bite ya.
>
> Of course the best fix would be for EDB to ship a build of Postgres
> that actually follows the platform-standard naming convention for this
> library.  I'm still wondering why they're linking to libuuid.so.
> Dave?
>
>                        regards, tom lane
>

Agreed.  However, if you go to
http://www.postgresql.org/download/linux then it points you right to
EnterpriseDB to download a bin installer.  So your choices are:

1) Use apt-get: This won't give you 9.0 yet (I think 10.04 only has 8.4)
2) Build it yourself (I'm not enough of a hacker to do this, probably
the case with most "novice" users)
3) One click installer maintained by EDB.
4) Some other repository out there?  Dunno if anyone maintains one.

I agree, EDB needs to make this "just work" on the latest Ubuntu.

Mike

Re: Missing uuid_generate_v1()

From
Magnus Hagander
Date:
On Thu, Oct 7, 2010 at 05:09, Mike Christensen <mike@kitchenpc.com> wrote:
> On Wed, Oct 6, 2010 at 7:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Mike Christensen <mike@kitchenpc.com> writes:
>>> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
>>>> to that instead of carrying a separate file.
>>
>>> So now what you're saying is if it's not broke, fix it till it is :)
>>
>> Well, it's hard to argue with that position ;-).  But I'll try anyway:
>> the platform-provided version of the library will be updated for bug
>> fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
>> you remember to do it.  Eventually that's gonna bite ya.
>>
>> Of course the best fix would be for EDB to ship a build of Postgres
>> that actually follows the platform-standard naming convention for this
>> library.  I'm still wondering why they're linking to libuuid.so.
>> Dave?
>>
>>                        regards, tom lane
>>
>
> Agreed.  However, if you go to
> http://www.postgresql.org/download/linux then it points you right to
> EnterpriseDB to download a bin installer.  So your choices are:

The very first paragraph says we recommend you use apt packages.

I wanted to move the packages higher up in the actual list, but was
voted down ;)

>
> 1) Use apt-get: This won't give you 9.0 yet (I think 10.04 only has 8.4)

It is. You need to enable the PPA at
https://launchpad.net/~pitti/+archive/postgresql, per
http://www.piware.de/2010/09/postgresql-9-0-final-released/.

We should probably add a link to that PPA from the donwload page.
Martin - any reason *not* to do that?



> 2) Build it yourself (I'm not enough of a hacker to do this, probably
> the case with most "novice" users)

Yeah, that's definitely not recommended.

> 3) One click installer maintained by EDB.
> 4) Some other repository out there?  Dunno if anyone maintains one.
>
> I agree, EDB needs to make this "just work" on the latest Ubuntu.

Yes, in this case it looks like a bug in the EDB installer that should be fixed.

But even when that is fixed, the recommendation is still to use the
APT packages since you get all the package management integration etc.

BTW - Dave, I notice the edb page says only ubuntu 8.04 and up, fedora
10 and up, etc  are supported by the installers from 9.0 and newer -
the download page on pg.org should probably be updated with that
information.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
On Wed, Oct 6, 2010 at 10:47 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Thu, Oct 7, 2010 at 05:09, Mike Christensen <mike@kitchenpc.com> wrote:
>> On Wed, Oct 6, 2010 at 7:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Mike Christensen <mike@kitchenpc.com> writes:
>>>> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
>>>>> to that instead of carrying a separate file.
>>>
>>>> So now what you're saying is if it's not broke, fix it till it is :)
>>>
>>> Well, it's hard to argue with that position ;-).  But I'll try anyway:
>>> the platform-provided version of the library will be updated for bug
>>> fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
>>> you remember to do it.  Eventually that's gonna bite ya.
>>>
>>> Of course the best fix would be for EDB to ship a build of Postgres
>>> that actually follows the platform-standard naming convention for this
>>> library.  I'm still wondering why they're linking to libuuid.so.
>>> Dave?
>>>
>>>                        regards, tom lane
>>>
>>
>> Agreed.  However, if you go to
>> http://www.postgresql.org/download/linux then it points you right to
>> EnterpriseDB to download a bin installer.  So your choices are:
>
> The very first paragraph says we recommend you use apt packages.
>
> I wanted to move the packages higher up in the actual list, but was
> voted down ;)
>
>>
>> 1) Use apt-get: This won't give you 9.0 yet (I think 10.04 only has 8.4)
>
> It is. You need to enable the PPA at
> https://launchpad.net/~pitti/+archive/postgresql, per
> http://www.piware.de/2010/09/postgresql-9-0-final-released/.
>
> We should probably add a link to that PPA from the donwload page.
> Martin - any reason *not* to do that?
>
>
>
>> 2) Build it yourself (I'm not enough of a hacker to do this, probably
>> the case with most "novice" users)
>
> Yeah, that's definitely not recommended.
>
>> 3) One click installer maintained by EDB.
>> 4) Some other repository out there?  Dunno if anyone maintains one.
>>
>> I agree, EDB needs to make this "just work" on the latest Ubuntu.
>
> Yes, in this case it looks like a bug in the EDB installer that should be fixed.
>
> But even when that is fixed, the recommendation is still to use the
> APT packages since you get all the package management integration etc.
>
> BTW - Dave, I notice the edb page says only ubuntu 8.04 and up, fedora
> 10 and up, etc  are supported by the installers from 9.0 and newer -
> the download page on pg.org should probably be updated with that
> information.
>
> --
>  Magnus Hagander
>  Me: http://www.hagander.net/
>  Work: http://www.redpill-linpro.com/
>

Thanks!  In the future, I'll use the apt package..  I prefer this
option when available..

Re: Missing uuid_generate_v1()

From
Peter Eisentraut
Date:
On ons, 2010-10-06 at 18:18 -0700, Mike Christensen wrote:
> 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

apt-get install libossp-uuid16



Re: Missing uuid_generate_v1()

From
Dave Page
Date:
On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mike Christensen <mike@kitchenpc.com> writes:
>> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
>>> to that instead of carrying a separate file.
>
>> So now what you're saying is if it's not broke, fix it till it is :)
>
> Well, it's hard to argue with that position ;-).  But I'll try anyway:
> the platform-provided version of the library will be updated for bug
> fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
> you remember to do it.  Eventually that's gonna bite ya.
>
> Of course the best fix would be for EDB to ship a build of Postgres
> that actually follows the platform-standard naming convention for this
> library.  I'm still wondering why they're linking to libuuid.so.
> Dave?

Because that's what comes with ossp-uuid 1.6.2, and I assume is what
configure chooses when we use --with-ossp-uuid:

[buildfarm@bf2-linux ~]$ uuid-config --libs
-luuid

FYI, there was also a bug in the installer which didn't copy the
library properly, which has been fixed for 9.0.2.


--
Dave Page
PostgreSQL Core Team
http://www.postgresql.org/

Re: Missing uuid_generate_v1()

From
Alexia Lau
Date:

Does anyone know where I can see what’s already fixed at 9.0.2?

Thanks,

Alexia

On 2010-10-07 09:54, Dave Page wrote:
> On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane <tgl@???> wrote:
> > Mike Christensen <mike@???> writes:
> >> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@???> wrote:
> >>> If you have a libossp-uuid.so.16, you might try symlinking libuuid.so.16
> >>> to that instead of carrying a separate file.
> >
> >> So now what you're saying is if it's not broke, fix it till it is :)
> >
> > Well, it's hard to argue with that position ;-).  But I'll try anyway:
> > the platform-provided version of the library will be updated for bug
> > fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
> > you remember to do it.  Eventually that's gonna bite ya.
> >
> > Of course the best fix would be for EDB to ship a build of Postgres
> > that actually follows the platform-standard naming convention for this
> > library.  I'm still wondering why they're linking to libuuid.so.
> > Dave?
>
> Because that's what comes with ossp-uuid 1.6.2, and I assume is what
> configure chooses when we use --with-ossp-uuid:
>
> [buildfarm@bf2-linux ~]$ uuid-config --libs
> -luuid
>
> FYI, there was also a bug in the installer which didn't copy the
> library properly, which has been fixed for 9.0.2.
>
>
>
>

Re: Missing uuid_generate_v1()

From
Mike Christensen
Date:
Oh, BTW, Tom - You were right about symlinking..  What I did totally
hosed Apache (though it didn't crash until 2 days later, then wouldn't
restart)..  Apache then griped about libuuid not loading.  I had to
get my friend Brian (Linux guru) to SSH in and clean up the whole mess
I made..  I think now it's legit now..

On Fri, Oct 22, 2010 at 7:00 PM, Alexia Lau <alau@esri.com> wrote:
> Does anyone know where I can see what’s already fixed at 9.0.2?
>
> Thanks,
>
> Alexia
>
> On 2010-10-07 09:54, Dave Page wrote:
>> On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane <tgl@???> wrote:
>> > Mike Christensen <mike@???> writes:
>> >> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@???> wrote:
>> >>> If you have a libossp-uuid.so.16, you might try symlinking
>> >>> libuuid.so.16
>> >>> to that instead of carrying a separate file.
>> >
>> >> So now what you're saying is if it's not broke, fix it till it is :)
>> >
>> > Well, it's hard to argue with that position ;-).  But I'll try anyway:
>> > the platform-provided version of the library will be updated for bug
>> > fixes, compatibility rebuilds, etc.  Your private copy won't be, unless
>> > you remember to do it.  Eventually that's gonna bite ya.
>> >
>> > Of course the best fix would be for EDB to ship a build of Postgres
>> > that actually follows the platform-standard naming convention for this
>> > library.  I'm still wondering why they're linking to libuuid.so.
>> > Dave?
>>
>> Because that's what comes with ossp-uuid 1.6.2, and I assume is what
>> configure chooses when we use --with-ossp-uuid:
>>
>> [buildfarm@bf2-linux ~]$ uuid-config --libs
>> -luuid
>>
>> FYI, there was also a bug in the installer which didn't copy the
>> library properly, which has been fixed for 9.0.2.
>>
>>
>>
>>

Re: Missing uuid_generate_v1()

From
Michael Gould
Date:
Is there a patch being worked on which will allow this contrib module to
work properly under Windows 64 bit machines using the 64 bit Postgres
server?  We need to be able to support both Windows and Linux servers
running Postgres.

Best Regards

Michael Gould

"Mike Christensen" <mike@kitchenpc.com> wrote:
> Oh, BTW, Tom - You were right about symlinking..  What I did totally
> hosed Apache (though it didn't crash until 2 days later, then wouldn't
> restart)..  Apache then griped about libuuid not loading.  I had to
> get my friend Brian (Linux guru) to SSH in and clean up the whole mess
> I made..  I think now it's legit now..
>
> On Fri, Oct 22, 2010 at 7:00 PM, Alexia Lau <alau@esri.com> wrote:
>> Does anyone know where I can see what?s already fixed at 9.0.2?
>>
>> Thanks,
>>
>> Alexia
>>
>> On 2010-10-07 09:54, Dave Page wrote:
>>> On Thu, Oct 7, 2010 at 3:56 AM, Tom Lane <tgl@???> wrote:
>>> > Mike Christensen <mike@???> writes:
>>> >> On Wed, Oct 6, 2010 at 7:38 PM, Tom Lane <tgl@???> wrote:
>>> >>> If you have a libossp-uuid.so.16, you might try symlinking
>>> >>> libuuid.so.16
>>> >>> to that instead of carrying a separate file.
>>> >
>>> >> So now what you're saying is if it's not broke, fix it till it is :)
>>> >
>>> > Well, it's hard to argue with that position ;-).  But I'll try anyway:
>>> > the platform-provided version of the library will be updated for bug
>>> > fixes, compatibility rebuilds, etc.  Your private copy won't be,
unless
>>> > you remember to do it.  Eventually that's gonna bite ya.
>>> >
>>> > Of course the best fix would be for EDB to ship a build of Postgres
>>> > that actually follows the platform-standard naming convention for this
>>> > library.  I'm still wondering why they're linking to libuuid.so.
>>> > Dave?
>>>
>>> Because that's what comes with ossp-uuid 1.6.2, and I assume is what
>>> configure chooses when we use --with-ossp-uuid:
>>>
>>> [buildfarm@bf2-linux ~]$ uuid-config --libs
>>> -luuid
>>>
>>> FYI, there was also a bug in the installer which didn't copy the
>>> library properly, which has been fixed for 9.0.2.
>>>
>>>
>>>
>>>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
Michael Gould, Managing Partner
Intermodal Software Solutions, LLC
904.226.0978
904.592.5250 fax



Re: Missing uuid_generate_v1()

From
Dave Page
Date:
On Mon, Oct 25, 2010 at 1:12 PM, Michael Gould
<mgould@intermodalsoftwaresolutions.net> wrote:
> Is there a patch being worked on which will allow this contrib module to
> work properly under Windows 64 bit machines using the 64 bit Postgres
> server?  We need to be able to support both Windows and Linux servers
> running Postgres.

It's not a PostgreSQL issue - the underlying library ossp-uuid doesn't
support 64 bit Windows.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company