Re: BUG #12241: uninitialized value $lib_path - Mailing list pgsql-bugs

From David G Johnston
Subject Re: BUG #12241: uninitialized value $lib_path
Date
Msg-id 1418697303306-5830826.post@n5.nabble.com
Whole thread Raw
In response to BUG #12241: uninitialized value $lib_path  (aleks.dark@inbox.ru)
List pgsql-bugs
aleks.dark wrote
> The following bug has been logged on the website:
>
> Bug reference:      12241
> Logged by:          Aleks
> Email address:

> aleks.dark@

> PostgreSQL version: 9.3.5
> Operating system:   Debian
> Description:
>
> Similar error to case in 2011, but this time no upgrade available. Any
> hints
> what is going wrong?
>
>
> In command line:
> $ psql --version
>
> Use of uninitialized value $lib_path in concatenation (.) or string at
> /usr/bin/psql line 132.
> psql (PostgreSQL) 9.3.5
>
>     libedit.so.2 => /usr/lib64/libedit.so.2 (0x00007f95ad709000)

Assuming this psql wrapper is the same as can be obtained via:

https://wiki.postgresql.org/wiki/Apt

The specific problem is two-fold:

1) Your version does not have libreadline linked in
2) The location of libedit is under "/usr/lib64" instead of "/lib" which is
where the wrapper script checks for it.

A little out of my experience here but:

The wrapper script assumes it will find libedit in the "/lib" subdirectory
and uses the portion of the path between "/lib" and "libedit" to go and try
to find a usable sibling readline.so.  Since there is none no valid value of
"$lib_path" is captured from the regular expression and no useful default is
provided in its absence.

Since libedit is indeed linked and the failure to load readline is non-fatal
you simply get the warning about the lib_path variable not being set but the
call to the underlying psql command succeeds.

As Tom said this is a packaging issue for "Debian" - though I suspect that
you have something unusual going on relative to what a typically
installation would look like.  The link above will launch you into the
proper area for finding information and support for Debian-based
distributions.

David J.





--
View this message in context:
http://postgresql.nabble.com/BUG-12241-uninitialized-value-lib-path-tp5830809p5830826.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #12241: uninitialized value $lib_path
Next
From: Пушкин Сергей
Date:
Subject: execution plan and record variable in dynamic sql