Обсуждение: could not access file "$libdir/plpgsql": No such file or directory

Поиск
Список
Период
Сортировка

could not access file "$libdir/plpgsql": No such file or directory

От
Victor Whiskey Yankee
Дата:
Hello List,

Trying to install 9.1.3 according to the INSTALL directions:
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test



Everything goes perfectly until I try to do this:
      initdb -D /usr/local/pgsql/data

I get this output and error:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 24MB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... FATAL:  could not access file "$libdir/plpgsql": No such file or directory
STATEMENT:  CREATE EXTENSION plpgsql;

child process exited with exit code 1
initdb: removing contents of data directory "/usr/local/pgsql/data"




I don't know what this means nor how to fix it.  In my $MY_PREFIX/lib directory I have these:
libecpg.a
libecpg_compat.a
libpgport.a
libpgtypes.a
libpq.a
pgxs

The pgxs is a directory itself.




My configuration line when building was:
./configure --prefix=$MY_PREFIX --disable-nls --disable-shared --disable-rpath --enable-thread-safety --without-tcl
--without-perl 
--without-python
--without-gssapi --without-krb5 --without-pam --without-ldap --without-bonjour --without-openssl --without-selinux
--without-ossp-uuid --without-libxml
--without-readline --with-zlib --with-includes=${ZLIB_DIR}/include --with-libraries=${ZLIB_DIR}/lib

The configure, compile and install went fine. BTW, I am trying to enable as little as possible because it will be used
onan embeded  
ARM9 device, but I will certainly enable whatever is necessary.

Any help would be appreciated.

Thanks,
Vic


Re: could not access file "$libdir/plpgsql": No such file or directory

От
Tom Lane
Дата:
Victor Whiskey Yankee <victor.whiskey.yankee@gmail.com> writes:
> loading PL/pgSQL server-side language ... FATAL:  could not access file "$libdir/plpgsql": No such file or directory

> I don't know what this means nor how to fix it.

It means you don't have a plpgsql.so file, and the reason is here:

> My configuration line when building was:
> ./configure --prefix=$MY_PREFIX --disable-nls --disable-shared --disable-rpath --enable-thread-safety --without-tcl
--without-perl 

--disable-shared has been deprecated for awhile, and it's evidently flat
out broken as of 9.1, since plpgsql.so is now effectively required.
Do you really need that?

(We should either fix this or remove the option, but in the meantime,
don't use it.)

            regards, tom lane

Re: could not access file "$libdir/plpgsql": No such file or directory

От
Victor Whiskey Yankee
Дата:
Thank you for the reply... after I removed the "--disable-shared" I do see the $libdir/plpgsql.so. But I do not see
any static libs, and "./configure" does not have an option to enable both static and shared..... so I guess it also
meansI cannot  
build postgress libs nor link my apps statically?



On 05/26/2012 02:23 PM, Tom Lane wrote:
> Victor Whiskey Yankee<victor.whiskey.yankee@gmail.com>  writes:
>> loading PL/pgSQL server-side language ... FATAL:  could not access file "$libdir/plpgsql": No such file or directory
>> I don't know what this means nor how to fix it.
> It means you don't have a plpgsql.so file, and the reason is here:
>
>> My configuration line when building was:
>> ./configure --prefix=$MY_PREFIX --disable-nls --disable-shared --disable-rpath --enable-thread-safety --without-tcl
--without-perl
> --disable-shared has been deprecated for awhile, and it's evidently flat
> out broken as of 9.1, since plpgsql.so is now effectively required.
> Do you really need that?

I don't know if I need whatever plpgsql is.... from what I read it is for supporting server-side sql, but I don't know
ifthat means  
I cannot use sql on the client side also?



>
> (We should either fix this or remove the option, but in the meantime,
> don't use it.)
>
>             regards, tom lane
>



Re: could not access file "$libdir/plpgsql": No such file or directory

От
Tom Lane
Дата:
Victor Whiskey Yankee <victor.whiskey.yankee@gmail.com> writes:
> Thank you for the reply... after I removed the "--disable-shared" I do see the $libdir/plpgsql.so. But I do not see
> any static libs, and "./configure" does not have an option to enable both static and shared..... so I guess it also
meansI cannot  
> build postgress libs nor link my apps statically?

I'm a bit confused by this.  There is no option to build plpgsql as a
static library, but that has nothing to do with linking your
applications.  You should see static versions of the libraries that
are meant to be used client-side: libpq.a, ecpglib.a, etc.

In general, if you're looking for minimum resource footprint, it seems
to me that static libraries are not what you want anyway; you tend to
end up with N copies of the same code.

            regards, tom lane