Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI6JG-0006k9-9T for pgsql-admin@arkaria.postgresql.org; Fri, 05 Mar 2021 08:59:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lI6JF-0001K3-00 for pgsql-admin@arkaria.postgresql.org; Fri, 05 Mar 2021 08:59:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI6JE-0001Jw-O3 for pgsql-admin@lists.postgresql.org; Fri, 05 Mar 2021 08:59:44 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lI6J9-0006l8-7a for pgsql-admin@lists.postgresql.org; Fri, 05 Mar 2021 08:59:44 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 006AE380551; Fri, 5 Mar 2021 09:59:37 +0100 (CET) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MmbQusAXQAsw; Fri, 5 Mar 2021 09:59:36 +0100 (CET) Received: from [192.168.178.197] (ip-37-201-154-46.hsi13.unitymediagroup.de [37.201.154.46]) by rs.plausibolo.de (Postfix) with ESMTPSA id CF60C38041E; Fri, 5 Mar 2021 09:59:35 +0100 (CET) Subject: Re: could not load library "$libdir/plpython2" while upgrading from postgresql-10 to 12 To: pgsql-admin@lists.postgresql.org References: From: Holger Jakobs Message-ID: <3641e106-1db2-270a-691d-521ffacf03c7@jakobs.com> Date: Fri, 5 Mar 2021 09:59:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JzWekOykcZoWOXcr7L4LB6rT9AsIH3G9R" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JzWekOykcZoWOXcr7L4LB6rT9AsIH3G9R Content-Type: multipart/mixed; boundary="NjP2kVxsYSWBOIoCMMPCE8EqsBUxvVg0K"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <3641e106-1db2-270a-691d-521ffacf03c7@jakobs.com> Subject: Re: could not load library "$libdir/plpython2" while upgrading from postgresql-10 to 12 References: In-Reply-To: --NjP2kVxsYSWBOIoCMMPCE8EqsBUxvVg0K Content-Type: multipart/alternative; boundary="------------4336FA88B3120983D1AB3CC3" Content-Language: de-DE This is a multi-part message in MIME format. --------------4336FA88B3120983D1AB3CC3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, Since Python2 is totally deprecated, you'll have to use Python3. postgresql-plpython3-12 - PL/Python 3 procedural language for PostgreSQL = 12 Regards, Holger Am 05.03.21 um 08:03 schrieb RAJAMOHAN: > Hello all, > > I am getting the below error while trying to upgrade from postgres 10=20 > to 12 version on ubuntu machine.=C2=A0=C2=A0It seems=C2=A0plpython2 is = not installed=20 > for the postgresql-12 version. > > *could not load library "$libdir/plpython2": ERROR: =C2=A0could not acc= ess=20 > file "$libdir/plpython2": No such file or directory > * > > > I tried to install it using the below command, but it was not=20 > successful. Whether I need to migrate the functions in postgres-10=20 > instance to plpython3 and try upgrading OR Is there any other way to=20 > install the package for postgresql-12 version? > > apt install postgresql-plpython-12 > Reading package lists... Done > Building dependency tree > Reading state information... Done > E: Unable to locate package postgresql-plpython-12 > > > OS details: > =C2=A0 Operating System: Ubuntu 18.04.1 LTS > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Kernel: Linux 5.4.0-1035-aws > =C2=A0 =C2=A0 =C2=A0 Architecture: x86-64 > > > Thanks & Regards, > Raj > --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --------------4336FA88B3120983D1AB3CC3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Hi,

Since Python2 is totally deprecated, you'll have to use Python3.

postgresql-plpython3-12 - PL/Python 3 procedural language for PostgreSQL 12

Regards,

Holger

Am 05.03.21 um 08:03 schrieb RAJAMOHAN= :
Hello all,

I am getting the below error while trying to upgrade from=C2= =A0 postgres 10 to 12 version on ubuntu machine.=C2=A0=C2=A0It seems=C2=A0plpython2 is not installed for the postgresql-12 version.

could not load library "$libdir/plpython2": ERROR: =C2=A0could not access file "$libdir/plpython2": No such file= or directory


I tried to install it using the below command, but it was not successful. Whether I need to migrate the functions in postgres-10 instance to plpython3 and try upgrading OR Is there any other way to install the package for postgresql-12 version?

apt install postgresql-plpython-12
Reading package lists... Done
Building dependency tree =C2=A0 =C2=A0 =C2=A0
Reading state information... Done
E: Unable to locate package postgresql-plpython-12


OS details:
=C2=A0 Operating System: Ubuntu 18.04.1 LTS
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Kernel: Linux 5.4.0-1= 035-aws
=C2=A0 =C2=A0 =C2=A0 Architecture: x86-64


Thanks & Regards,
Raj

--=20
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
--------------4336FA88B3120983D1AB3CC3-- --NjP2kVxsYSWBOIoCMMPCE8EqsBUxvVg0K-- --JzWekOykcZoWOXcr7L4LB6rT9AsIH3G9R Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCYEHy9gUDAAAAAAAKCRCKV5yTsxlhuu+1 AJ0TujT80O6vsXdML4oOtoBRlfHzNwCfaCgtnEu/qPHmgBqcNhvvWFIIt0A= =uCFp -----END PGP SIGNATURE----- --JzWekOykcZoWOXcr7L4LB6rT9AsIH3G9R--