Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tN6px-008dn4-9x for pgadmin-support@arkaria.postgresql.org; Mon, 16 Dec 2024 08:52:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tN6pu-004Utl-Lw for pgadmin-support@arkaria.postgresql.org; Mon, 16 Dec 2024 08:52:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tN6pu-004UtV-8n for pgadmin-support@lists.postgresql.org; Mon, 16 Dec 2024 08:52:19 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tN6ps-00375N-BL for pgadmin-support@postgresql.org; Mon, 16 Dec 2024 08:52:18 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-6efed201f1dso26975357b3.0 for ; Mon, 16 Dec 2024 00:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1734339134; x=1734943934; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rSFtHAiTEhkqIGOduM+F31hW70saVZ82ZFeLelSK0I8=; b=jUs3mlvkpAIIhqLCQ6LOCRwIoLQRR0R0Mnoe1pJiDMjNyVl12z5b9LVdfR35qOdsGd HIMKzCGarae9yb9rjH8XmtiyBOrZN5RrcZp/EcBwBkz7phFVsRuy/sDRDo/Zj1/9aW+g 1tAwF5qZ73J5YKed6TwDy9saR5WQc0N6skJmVq4gzHLPhmJukF2Etf0uUQx3CcE/SJpW jInzyfuRSLyFSpcEGNxociTu3m2FpVMOFRZoe4Y+Jwxo9ghI14tsgrN1rZhxb2fpL9fU MxzUVnZpDzmDn9PPbS8868XaOLNam9DYIZPnzMUZCs4cAiQq651QeWc/KN4rfQ/ZIvbs KD0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734339134; x=1734943934; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rSFtHAiTEhkqIGOduM+F31hW70saVZ82ZFeLelSK0I8=; b=vxJCI4qPHILMhlJZ+Kfh/qJg/vE8Rd9ZogAJu69FMPbm1oaaD5BRZBLv1RgdmkhFhq vNrACzOsA2yqC7cJFfELI/ggyYQ85kyU8ta5T4c7X/AZyub8k4HtD2sccChie1kLnVBy +ASuzyH+kY6FrWVnP1IFfDO/nQFfqg1B0fuPPBV0rMeEMdtF4W+PvBQ+vQy9ABwQD0Go kpsFa6gmki4ZFH/4WKslI3wwCbiIPSprawsVrEhUySp8uq+heE9QQGu/Vm9tTSs+i89h mHclZrXHBJ3vhJlim5t3RGMdAhv5c5IGltlmAbA6Y9yg2n86whaJwt4z3sYGVWW5aY0k wtEw== X-Gm-Message-State: AOJu0YyuGKhWIszp+5Vm0hZF5XCXd3/I3ZSIbOoO+uQoktA2IuEtPuiP YUDumx88AgPPzfSbYAh44RIheFOhFEWQcRWLiRZSs3AU6h/xC4YE6MJOWJWAS76ASje3MekBW7R dNJ1kGmHaWPpiLYW3axIT6Fkn8UzF0YtEj6Qt X-Gm-Gg: ASbGnctT4OcqkTouBiYPrP4M2zELj6/jhMdxl5s8NVb8Jb0Wop20O3Kwq4fsGjyS9z7 Ny4PIeOeUeSMy+2WqjL60UI6jGoq6QpKU+EPpLlY= X-Google-Smtp-Source: AGHT+IFQ1zY9ePjlbcob1LoRM9fXMGTzdeEu93Pwh0VOHH7aoCextTGZhma7Dq+ANovpAY34+h6tCnL3fHYe3lo9GzA= X-Received: by 2002:a05:690c:4b0b:b0:6ef:5abd:d0d with SMTP id 00721157ae682-6f2798ea371mr94623847b3.0.1734339133607; Mon, 16 Dec 2024 00:52:13 -0800 (PST) MIME-Version: 1.0 References: <1ca92999-e329-40a8-a388-302f9bb55e2e@gmail.com> <909690a7-3dbc-4f75-97b1-b5829d41df97@gmail.com> <2bf48205-a8ad-49fc-a5d8-ada1bee6573d@gmail.com> <3dd1d051-875a-4d9c-bfee-1753ace8a615@gmail.com> <39b49a11-a7e7-4330-9ad8-11fe339a1904@gmail.com> <7a7155e5-4e46-4030-b0c2-83036b4d447f@gmail.com> In-Reply-To: <7a7155e5-4e46-4030-b0c2-83036b4d447f@gmail.com> From: Khushboo Vashi Date: Mon, 16 Dec 2024 14:22:02 +0530 Message-ID: Subject: Re: [SOLVED] Re: Cannot Run pgAdmin4 v8.13 on AlmaLinux 8 after upgrade from v8.12 To: Surya Widyanto Cc: pgAdmin Support Content-Type: multipart/alternative; boundary="000000000000fab04506295f4b02" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fab04506295f4b02 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 13, 2024 at 6:20=E2=80=AFPM Surya Widyanto = wrote: > Hi, > > I just want to share that the problem with my installation of pgAdmin4 on > my AlmaLinux v8.x and v9.x are now can run with Web mode using Apache HTT= PD. > I will try to explain how I overcome the problem > > 1. First, the error log of my pgAdmin4 are like below > > mod_wsgi (pid=3D3540264): Failed to exec Python script file > '/usr/pgadmin4/web/pgAdmin4.wsgi'. > mod_wsgi (pid=3D3540264): Exception occurred processing WSGI script > '/usr/pgadmin4/web/pgAdmin4.wsgi'. > Traceback (most recent call last): > File "/usr/pgadmin4/web/pgAdmin4.wsgi", line 36, in > from pgAdmin4 import app as application > File "/usr/pgadmin4/web/pgAdmin4.py", line 93, in > app =3D create_app() > File "/usr/pgadmin4/web/pgadmin/__init__.py", line 546, in create_app > driver.init_app(app) > File "/usr/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 27, in > init_app > DriverRegistry.load_modules(app) > File "/usr/pgadmin4/web/pgadmin/utils/driver/registry.py", line 20, in > load_modules > from . import psycopg3 as module > File "/usr/pgadmin4/web/pgadmin/utils/driver/psycopg3/__init__.py", lin= e > 21, in > import psycopg > File > "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/__init__.py", > line 9, in > from . import pq # noqa: F401 import early to stabilize side effects > File > "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.py"= , > line 117, in > import_from_libpq() > File > "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.py"= , > line 109, in import_from_libpq > raise ImportError( > ImportError: no pq wrapper available. > Attempts made: > - couldn't import psycopg 'c' implementation: > /usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg_c/ > pq.cpython-39-x86_64-linux-gnu.so: undefined symbol: PQchangePassword > - couldn't import psycopg 'binary' implementation: No module named > 'psycopg_binary' > - couldn't import psycopg 'python' implementation: > > 2. From the log I know that after upgrading from pgAdmin4 v8.12 to v8.13 > and above, it require some *psycopg_binary *python package > > 3. So I open the pgAdmin4 virtual environment using command: > > source /usr/pgadmin4/venv/bin/activate > > 4. Then run PIP to install the required package *psycopg_binaryby *runnin= g > command: > > > *pip install "psycopg[binary]"* > *psycpg[binary]* installs all the libraries needed. So it will not use your system's libpq. > 5. And restart the *Apache HTTPD*, and access it from web browser. > That's it, I can access my instance of pgAdmin4 v8.13 or the latest v8.14 > from web. > > Regards, > ayrus02 > > > On 03-12-2024 12:33, Khushboo Vashi wrote: > > > > On Mon, Dec 2, 2024 at 6:31=E2=80=AFPM Surya Widyanto = wrote: > >> Hi, >> >> For this problem is it already identified the main problem? is it a bug >> on the new release v8.13? >> Is there any hint how to solve the problem? until now, I still cannot >> upgrade to v8.13 because of this problem >> >> Please try moving libpq.so and libpq.so.5 to the other location and > keeping only one libpq `/usr/lib64/libpq.so.5.17`. > > Regards, >> ayrus02 >> >> On 18-11-2024 16:42, Khushboo Vashi wrote: >> >> Hi, >> >> Make sure that your libpq is located at LIBDIR =3D /usr/lib64. This erro= r >> may occur when you have multiple libpq installed on your system. Also do >> not forget to restart the apache server. >> >> Thanks, >> Khushboo >> >> >> >> On Mon, Nov 18, 2024 at 3:06=E2=80=AFPM Surya Widyanto wrote: >> >>> Hi, >>> >>> Below are the output of pg_config on on my AlmaLinux 8 (x64) machine: >>> >>> BINDIR =3D /usr/bin >>> DOCDIR =3D /usr/share/doc/pgsql >>> HTMLDIR =3D /usr/share/doc/pgsql >>> INCLUDEDIR =3D /usr/include >>> PKGINCLUDEDIR =3D /usr/include/pgsql >>> INCLUDEDIR-SERVER =3D /usr/include/pgsql/server >>> LIBDIR =3D /usr/lib64 >>> PKGLIBDIR =3D /usr/lib64/pgsql >>> LOCALEDIR =3D /usr/share/locale >>> MANDIR =3D /usr/share/man >>> SHAREDIR =3D /usr/share/pgsql >>> SYSCONFDIR =3D /etc/pgsql >>> PGXS =3D /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk >>> CONFIGURE =3D '--build=3Dx86_64-redhat-linux-gnu' >>> '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' >>> '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr= ' >>> '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' >>> '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr= /lib64' >>> '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' >>> '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' >>> '--infodir=3D/usr/share/info' '--disable-rpath' '--with-openssl' >>> '--with-gssapi' '--with-includes=3D/usr/include' >>> '--with-libraries=3D/usr/lib64' '--enable-nls' '--with-ldap' '--with-lz= 4' >>> '--with-selinux' '--with-systemd' >>> '--with-system-tzdata=3D/usr/share/zoneinfo' >>> 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-lin= ux-gnu' >>> 'CFLAGS=3D-O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_S= OURCE=3D2 >>> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >>> -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 >>> -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric >>> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >>> 'LDFLAGS=3D-Wl,--as-needed' 'CXXFLAGS=3D-O2 -g -pipe -Wall >>> -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSE= RTIONS >>> -fexceptions -fstack-protector-strong -grecord-gcc-switches >>> -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 >>> -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric >>> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' >>> 'PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr/share/pkgconfig' >>> 'PYTHON=3D/usr/bin/python3' >>> CC =3D gcc >>> CPPFLAGS =3D -D_GNU_SOURCE -I/usr/include >>> CFLAGS =3D -Wall -Wmissing-prototypes -Wpointer-arith >>> -Wdeclaration-after-statement -Werror=3Dvla -Wendif-labels >>> -Wmissing-format-attribute -Wimplicit-fallthrough=3D3 -Wcast-function-t= ype >>> -Wshadow=3Dcompatible-local -Wformat-security -fno-strict-aliasing -fwr= apv >>> -fexcess-precision=3Dstandard -Wno-format-truncation -Wno-stringop-trun= cation >>> -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 >>> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong >>> -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 >>> -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric >>> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection >>> CFLAGS_SL =3D -fPIC >>> LDFLAGS =3D -Wl,--as-needed -L/usr/lib64 -Wl,--as-needed >>> LDFLAGS_EX =3D >>> LDFLAGS_SL =3D >>> LIBS =3D -lpgcommon -lpgport -lselinux -llz4 -lssl -lcrypto -lgssapi_kr= b5 >>> -lz -lreadline -lpthread -lrt -ldl -lm >>> VERSION =3D PostgreSQL 17.0 >>> >>> Below are the output of pg_config on on my AlmaLinux 9 (x64) machine: >>> >>> BINDIR =3D /usr/bin >>> DOCDIR =3D /usr/share/doc/pgsql >>> HTMLDIR =3D /usr/share/doc/pgsql >>> INCLUDEDIR =3D /usr/include >>> PKGINCLUDEDIR =3D /usr/include/pgsql >>> INCLUDEDIR-SERVER =3D /usr/include/pgsql/server >>> LIBDIR =3D /usr/lib64 >>> PKGLIBDIR =3D /usr/lib64/pgsql >>> LOCALEDIR =3D /usr/share/locale >>> MANDIR =3D /usr/share/man >>> SHAREDIR =3D /usr/share/pgsql >>> SYSCONFDIR =3D /etc/pgsql >>> PGXS =3D /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk >>> CONFIGURE =3D '--build=3Dx86_64-redhat-linux-gnu' >>> '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' >>> '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr= ' >>> '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' >>> '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr= /lib64' >>> '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' >>> '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' >>> '--infodir=3D/usr/share/info' '--disable-rpath' '--with-openssl' >>> '--with-gssapi' '--with-includes=3D/usr/include' >>> '--with-libraries=3D/usr/lib64' '--enable-nls' '--with-ldap' '--with-lz= 4' >>> '--with-selinux' '--with-systemd' >>> '--with-system-tzdata=3D/usr/share/zoneinfo' >>> 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-lin= ux-gnu' >>> 'CC=3Dgcc' 'CFLAGS=3D-O2 -flto=3Dauto -ffat-lto-objects -fexceptions -g >>> -grecord-gcc-switches -pipe -Wall -Werror=3Dformat-security >>> -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS >>> -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-stro= ng >>> -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=3Dx86-64-v2 >>> -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection >>> -fcf-protection' 'LDFLAGS=3D-Wl,--as-needed' 'CXX=3Dg++' 'CXXFLAGS=3D-O= 2 >>> -flto=3Dauto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -p= ipe >>> -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 >>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-= cc1 >>> -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc= 1 >>> -m64 -march=3Dx86-64-v2 -mtune=3Dgeneric -fasynchronous-unwind-tables >>> -fstack-clash-protection -fcf-protection' >>> 'PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr/share/pkgconfig' >>> 'PYTHON=3D/usr/bin/python3' >>> CC =3D gcc >>> CPPFLAGS =3D -D_GNU_SOURCE -I/usr/include >>> CFLAGS =3D -Wall -Wmissing-prototypes -Wpointer-arith >>> -Wdeclaration-after-statement -Werror=3Dvla -Wendif-labels >>> -Wmissing-format-attribute -Wimplicit-fallthrough=3D3 -Wcast-function-t= ype >>> -Wshadow=3Dcompatible-local -Wformat-security -fno-strict-aliasing -fwr= apv >>> -fexcess-precision=3Dstandard -Wno-format-truncation -Wno-stringop-trun= cation >>> -O2 -flto=3Dauto -ffat-lto-objects -fexceptions -g -grecord-gcc-switche= s >>> -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 >>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-= cc1 >>> -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc= 1 -m64 >>> -march=3Dx86-64-v2 -mtune=3Dgeneric -fasynchronous-unwind-tables >>> -fstack-clash-protection -fcf-protection >>> CFLAGS_SL =3D -fPIC >>> LDFLAGS =3D -Wl,--as-needed -L/usr/lib64 -Wl,--as-needed >>> LDFLAGS_EX =3D >>> LDFLAGS_SL =3D >>> LIBS =3D -lpgcommon -lpgport -lselinux -llz4 -lssl -lcrypto -lgssapi_kr= b5 >>> -lz -lreadline -lm >>> VERSION =3D PostgreSQL 17.0 >>> >>> Regards, >>> ayrus02 >>> >>> >>> On 18-11-2024 16:26, Khushboo Vashi wrote: >>> >>> >>> >>> On Mon, Nov 18, 2024 at 2:48=E2=80=AFPM Surya Widyanto >>> wrote: >>> >>>> Hi, >>>> >>>> Below are the output of *dnf list libpq5** on my AlmaLinux 8 (x64) >>>> machine: >>>> >>>> Last metadata expiration check: 3:28:40 ago on Mon 18 Nov 2024 12:43:1= 9 >>>> PM WIB. >>>> Installed Packages >>>> libpq5.x86_64 - 17.0-43PGDG.rhel8 - @pgAdmin4 >>>> Available Packages >>>> libpq5-devel.x86_64 - 17.0-43PGDG.rhel8 - pgAdmin4 >>>> libpq5-devel.x86_64 - 17.0-43PGDG.rhel8 - pgdg-common >>>> >>>> This looks fine. >>> What's the output of pg_config ? >>> >>>> And below are the output of *dnf list libpq5** on my AlmaLinux 9 (x64) >>>> machine: >>>> >>>> Last metadata expiration check: 0:38:20 ago on Sen 18 Nov 2024 03:33:4= 3 >>>> . >>>> Installed Packages >>>> libpq5.x86_64 - 17.0-43PGDG.rhel9 - @pgdg-common >>>> Available Packages >>>> libpq5-devel.x86_64 - 17.0-43PGDG.rhel9 - pgAdmin4 >>>> libpq5-devel.x86_64 - 17.0-43PGDG.rhel9 - pgdg-common >>>> >>>> Regards, >>>> ayrus02 >>>> On 18-11-2024 16:06, Khushboo Vashi wrote: >>>> >>>> >>>> >>>> On Mon, Nov 18, 2024 at 1:13=E2=80=AFPM Surya Widyanto >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I've upgraded the libpq5 to version 17.0-43PGDG.rhel8 >>>>> I've also restart the apache server. >>>>> >>>> >>>> What's the output of `yum list libpq5*` ? >>>> >>>>> >>>>> But the problem still exist. With the same error in log file. >>>>> >>>>> I've also can confirm that this also happened on my other server >>>>> running AlmaLinux 9 (x64). >>>>> My other server also has libpq5 with version 17.0-43PGDG.rhel9 and >>>>> also running as Web Mode via Apache. >>>>> >>>>> Regards, >>>>> ayrus02 >>>>> >>>>> On 18-11-2024 14:21, Khushboo Vashi wrote: >>>>> >>>>> Hi, >>>>> >>>>> On Mon, Nov 18, 2024 at 12:24=E2=80=AFPM Surya Widyanto >>>>> wrote: >>>>> >>>>>> Hi Vashi, >>>>>> >>>>>> Yes, I can confirm it is installed with version: >>>>>> libpq5.x86_64 - v16.3-43PGDG.rhel8 >>>>>> >>>>> >>>>> During the pgAdmin upgrade on your system, the libpq5 should have bee= n >>>>> upgraded to the latest (v17), which didn't happen in your case. >>>>> Can you please upgrade libpq5 to the latest version? It should fix >>>>> this issue. >>>>> >>>>> Thanks, >>>>> Khushboo >>>>> >>>>>> >>>>>> Regards, >>>>>> ayrus02 >>>>>> >>>>>> On 18-11-2024 13:48, Khushboo Vashi wrote: >>>>>> >>>>>> Is libpq5 installed on your system? >>>>>> >>>>>> On Mon, Nov 18, 2024 at 12:11=E2=80=AFPM Surya Widyanto >>>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Today, I've upgraded my pgAdmin4 version from v8.12 to v8.13 using >>>>>>> dnf on AlmaLinux 8. >>>>>>> >>>>>>> My pgAdmin4 is installed as web mode and accessed via Apache. >>>>>>> >>>>>>> After upgrading to v8.13, when I access the pgAdmin4 address from >>>>>>> web browser, it give an error 500. When I look at the error log, it >>>>>>> contains the line below: >>>>>>> >>>>>>> mod_wsgi (pid=3D3535715): Failed to exec Python script file >>>>>>> '/usr/pgadmin4/web/pgAdmin4.wsgi'. >>>>>>> mod_wsgi (pid=3D3535715): Exception occurred processing WSGI script >>>>>>> '/usr/pgadmin4/web/pgAdmin4.wsgi'. >>>>>>> Traceback (most recent call last): >>>>>>> ImportError: no pq wrapper available. >>>>>>> Attempts made: >>>>>>> - couldn't import psycopg 'c' implementation: >>>>>>> /usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg_c/ >>>>>>> pq.cpython-39-x86_64-linux-gnu.so: undefined symbol: >>>>>>> PQchangePassword >>>>>>> - couldn't import psycopg 'binary' implementation: No module named >>>>>>> 'psycopg_binary' >>>>>>> - couldn't import psycopg 'python' implementation: >>>>>>> >>>>>>> The primary concern is at *undefined symbol: PQchangePassword* >>>>>>> >>>>>>> Is there any bug or I have do the update wrongly? >>>>>>> >>>>>>> Regards, >>>>>>> ayrus02 >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> > --000000000000fab04506295f4b02 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Dec 13,= 2024 at 6:20=E2=80=AFPM Surya Widyanto <ayrus02@gmail.com> wrote:
=20 =20 =20
Hi,

I just want to share that the problem with my installation of pgAdmin4 on my AlmaLinux v8.x and v9.x are now can run with Web mode using Apache HTTPD.
I will try to explain how I overcome the problem

1. First, the error log of my pgAdmin4 are like below

mod_wsgi (pid=3D3540264): Failed to exec Python script file '/usr/pgadmin4/web/pgAdmin4.wsgi'.
mod_wsgi (pid=3D3540264): Exception occurred processing WSGI script '/usr/pgadmin4/web/pgAdmin4.wsgi'.
Traceback (most recent call last):
=C2=A0 File "/usr/pgadmin4/web/pgAdmin4.wsgi", line 36,= in <module>
=C2=A0=C2=A0=C2=A0 from pgAdmin4 import app as application
=C2=A0 File "/usr/pgadmin4/web/pgAdmin4.py", line 93, i= n <module>
=C2=A0=C2=A0=C2=A0 app =3D create_app()
=C2=A0 File "/usr/pgadmin4/web/pgadmin/__init__.py", li= ne 546, in create_app
=C2=A0=C2=A0=C2=A0 driver.init_app(app)
=C2=A0 File "/usr/pgadmin4/web/pgadmin/utils/driver/__init__= .py", line 27, in init_app
=C2=A0=C2=A0=C2=A0 DriverRegistry.load_modules(app)
=C2=A0 File "/usr/pgadmin4/web/pgadmin/utils/driver/registry= .py", line 20, in load_modules
=C2=A0=C2=A0=C2=A0 from . import psycopg3 as module
=C2=A0 File "/usr/pgadmin4/web/pgadmin/utils/driver/psycopg3/__init__.py= ", line 21, in <module>
=C2=A0=C2=A0=C2=A0 import psycopg
=C2=A0 File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/__= init__.py", line 9, in <module>
=C2=A0=C2=A0=C2=A0 from . import pq=C2=A0 # noqa: F401 import ear= ly to stabilize side effects
=C2=A0 File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.= py", line 117, in <module>
=C2=A0=C2=A0=C2=A0 import_from_libpq()
=C2=A0 File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.= py", line 109, in import_from_libpq
=C2=A0=C2=A0=C2=A0 raise ImportError(
ImportError: no pq wrapper available.
Attempts made:
- couldn't import psycopg 'c' implementation: /usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg_c/pq.cpython-39-x86_64= -linux-gnu.so: undefined symbol: PQchangePassword
- couldn't import psycopg 'binary' implementation: No= module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation:

2. From the log I know that after upgrading from pgAdmin4 v8.12 to v8.13 and above, it require some psycopg_binary python package

3. So I open the pgAdmin4 virtual environment using command:

source /usr/pgadmin4/venv/bin/activate

4. Then run PIP to install the required package psycopg_binaryb= y running command:

pip install "psycopg[binary]"= ;

psycpg[binary] ins= talls all the libraries needed. So it will not use your system's libpq.=

5. And restart the Apache HTTPD, and access it from web browser.

That's it, I can access my instance of pgAdmin4 v8.13 or the latest v8.14 from web.

Regards,
ayrus02


On 03-12-2024 12:33, Khushboo Vashi wrote:
=20


On Mon, Dec 2, 2024 at 6:31=E2=80=AFPM Surya Widyanto <ayrus02@gmail.com> wrote:
Hi,

For this problem is it already identified the main problem? is it a bug on the new release v8.13?
Is there any hint how to solve the problem? until now, I still cannot upgrade to v8.13 because of this problem

Please try moving libpq.so and libpq.so.5 to the other location and keeping only one libpq `/usr/lib64/libpq.so.5.17`.

Regards,
ayrus02

On 18-11-2024 16:42, Khushboo Vashi wrote:
Hi,

Make sure that your libpq is located at=C2=A0LIBDIR =3D /usr/lib64. This error may occur when you have multiple libpq installed on your system. Also do not forget to restart the apache server.

Thanks,
Khushboo



On Mon, Nov 18, 202= 4 at 3:06=E2=80=AFPM Surya Widyanto <ayrus02@gmail.com> wrote:
Hi,

Below are the output of pg_config on on my AlmaLinux 8 (x64) machine:

BINDIR =3D /usr/bin
DOCDIR =3D /usr/share/doc/pgsql
HTMLDIR =3D /usr/share/doc/pgsql
INCLUDEDIR =3D /usr/include
PKGINCLUDEDIR =3D /usr/include/pgsql
INCLUDEDIR-SERVER =3D /usr/include/pgsql/server LIBDIR =3D /usr/lib64
PKGLIBDIR =3D /usr/lib64/pgsql
LOCALEDIR =3D /usr/share/locale
MANDIR =3D /usr/share/man
SHAREDIR =3D /usr/share/pgsql
SYSCONFDIR =3D /etc/pgsql
PGXS =3D /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk
CONFIGURE =3D=C2=A0 '--build=3Dx86_64-redhat-= linux-gnu' '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/u= sr' '--bindir=3D/usr/bin' '--sbindir=3D/u= sr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/u= sr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--disa= ble-rpath' '--with-openssl' '--with-gssapi' '--with-includes=3D/usr/include' '--with-libraries=3D/usr/lib64' '--en= able-nls' '--with-ldap' '--with-lz4' '-= -with-selinux' '--with-systemd' '--with-system-tzdata=3D/usr/share/zoneinfo&#= 39; 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=3D-Wl,--as-needed' 'CXXFLAGS= =3D-O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr= /share/pkgconfig' 'PYTHON=3D/usr/bin/python3'
CC =3D gcc
CPPFLAGS =3D -D_GNU_SOURCE -I/usr/include
CFLAGS =3D -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=3Dvla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3D3 -Wcast-function-type -Wshadow=3Dcompatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=3Dstandard -Wno-format-truncation -Wno-stringop-truncation -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
CFLAGS_SL =3D -fPIC
LDFLAGS =3D -Wl,--as-needed -L/usr/lib64 -Wl,--as-needed
LDFLAGS_EX =3D
LDFLAGS_SL =3D
LIBS =3D -lpgcommon -lpgport -lselinux -llz4 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lpthread -lrt -ldl -lm
VERSION =3D PostgreSQL 17.0

Below are the output of pg_config on on my AlmaLinux 9 (x64) machine:

BINDIR =3D /usr/bin
DOCDIR =3D /usr/share/doc/pgsql
HTMLDIR =3D /usr/share/doc/pgsql
INCLUDEDIR =3D /usr/include
PKGINCLUDEDIR =3D /usr/include/pgsql
INCLUDEDIR-SERVER =3D /usr/include/pgsql/server LIBDIR =3D /usr/lib64
PKGLIBDIR =3D /usr/lib64/pgsql
LOCALEDIR =3D /usr/share/locale
MANDIR =3D /usr/share/man
SHAREDIR =3D /usr/share/pgsql
SYSCONFDIR =3D /etc/pgsql
PGXS =3D /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk
CONFIGURE =3D=C2=A0 '--build=3Dx86_64-redhat-= linux-gnu' '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/u= sr' '--bindir=3D/usr/bin' '--sbindir=3D/u= sr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/u= sr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--disa= ble-rpath' '--with-openssl' '--with-gssapi' '--with-includes=3D/usr/include' '--with-libraries=3D/usr/lib64' '--en= able-nls' '--with-ldap' '--with-lz4' '-= -with-selinux' '--with-systemd' '--with-system-tzdata=3D/usr/share/zoneinfo&#= 39; 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-linux-gnu' &#= 39;CC=3Dgcc' 'CFLAGS=3D-O2 -flto=3Dauto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=3Dx86-64-v2 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=3D-Wl,--as-needed' 'CXX=3Dg+= +' 'CXXFLAGS=3D-O2 -flto=3Dauto -ffat-lto-object= s -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1= =C2=A0 -m64 -march=3Dx86-64-v2 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr= /share/pkgconfig' 'PYTHON=3D/usr/bin/python3'
CC =3D gcc
CPPFLAGS =3D -D_GNU_SOURCE -I/usr/include
CFLAGS =3D -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=3Dvla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3D3 -Wcast-function-type -Wshadow=3Dcompatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=3Dstandard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=3Dauto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=3Dx86-64-v2 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
CFLAGS_SL =3D -fPIC
LDFLAGS =3D -Wl,--as-needed -L/usr/lib64 -Wl,--as-needed
LDFLAGS_EX =3D
LDFLAGS_SL =3D
LIBS =3D -lpgcommon -lpgport -lselinux -llz4 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
VERSION =3D PostgreSQL 17.0

Regards,
ayrus02


On 18-11-2024 16:26, Khushboo Vashi wrote:


On Mon, Nov 18, 2024 at 2:48=E2=80=AFPM Surya Widyant= o <ayrus02@gmail.com> wrote:
Hi,

Below are the output of dnf list libpq5* on my AlmaLinux 8 (x64) machine:

Last metadata expiration check: 3:28:40 ago on Mon 18 Nov 2024 12:43:19 PM WIB.
Installed Packages
libpq5.x86_64 - 17.0-43PGDG.rhel8 - @pgAdmin4
Available Packages
libpq5-devel.x86_64 - 17.0-43PGDG.rhel8 - pgAdmin4
libpq5-devel.x86_64 - 17.0-43PGDG.rhel8 - pgdg-common
<= br>

This looks fine.
What's the output of pg_config ?=C2=A0=
And below are the output of dnf list libpq5* on my AlmaLinux 9 (x64) machine:

Last metadata expiration check: 0:38:20 ago on Sen 18 Nov 2024 03:33:43 .
Installed Packages
libpq5.x86_64 - 17.0-43PGDG.rhel9 - @pgdg-common
Available Packages
libpq5-devel.x86_64 - 17.0-43PGDG.rhel9 - pgAdmin4
libpq5-devel.x86_64 - 17.0-43PGDG.rhel9 - pgdg-common
<= br>

Regards,
ayrus02

On 18-11-2024 16:06, Khushboo Vashi wrote:


On Mon, Nov 18, 2024 at 1:13=E2=80=AFP= M Surya Widyanto <ayrus02@gmail.com> wrote:
Hi,

I've upgraded the libpq5 to version 17.0-43PGDG.rhel8
I've also restart the apach= e server.

What's the output of `yum list libpq5*` ?

But the problem still exist. With the same error in log file.

I've also can confirm that this also happened on my other server running AlmaLinux 9 (x64).
My other server also has libpq5 with version 17.0-43PGDG.rhel9 and also running as Web Mode via Apache.

Regards,
ayrus02

On 18-11-2024 14:21, Khushboo Vashi wrote:
Hi,

On Mon, Nov 18, 2024 at 12:24=E2=80=AFPM Surya Widyanto <ayrus02@gmail.com> wrote:=
Hi Vashi,

Yes, I can confirm it is installed with version:
libpq5.x86_64 - v16.3-43PGDG.rhel8<= /font>

During the pgAdmin upgrade on your system, the libpq5 should have been upgraded to the latest (v17), which didn't happen in your case.
Can you please upgrade libpq5 to the latest version? It should fix this issue.

Thanks,
Khushboo

Regards,
ayrus02

On 18-11-2024 13:48, Khushboo Vashi wrote:
Is libpq5 installed on your system?

On Mon, Nov 18, 2024 at 12:11=E2=80=AFPM Surya Widyant= o <ayrus02@gmail.= com> wrote:

Hi,

Today, I'v= e upgraded my pgAdmin4 version from v8.12 to v8.13 using dnf on AlmaLinux 8.

My pgAdmin4 is installed as web mode and accessed via Apache.

After upgrading to v8.13, when I access the pgAdmin4 address from web browser, it give an error 500. When I look at the error log, it contains the line below:

mod_wsgi (pid=3D3535715): Failed to exec Python script file '/usr/pgadmin4/web/pgAdmin4.wsgi'.
mod_wsgi (pid=3D3535715): Exception occurred processing WSGI script '/usr/pgadmin= 4/web/pgAdmin4.wsgi'.
Traceback (most recent call last):
ImportError: no pq wrapper available.
Attempts made: - couldn't import psycopg 'c' implementation: /usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg_c/pq.cpython-39-x86_64= -linux-gnu.so: undefined symbol: PQchangePassword<= br> - couldn't import psycopg 'binary' implementation: No module named 'psycopg_bina= ry'
- couldn't import psycopg 'python' implementation:

The primary concern is at undefined symbol: PQchangePassword<= /b>

Is there any bug or I have do the update wrongly?

Regards,
ayrus02







--000000000000fab04506295f4b02--