Reputation: 19
I'm trying to make pgAdmin4 work with PostgreSQL on Arch Linux, but when I open pgAdmin, I get the following error:
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
Semaphore name: "pgadmin4-vino-a59283b86ae8ae85d20fdf770d799dd7-sema"
Shared memory segment name: "pgadmin4-vino-a59283b86ae8ae85d20fdf770d799dd7-shmem"
QIODevice::read (QFile, "/home/vino/.local/share/pgadmin4.d41d8cd98f00b204e9800998ecf8427e.addr"): device not open
Already running. Opening browser tab to: "" and exiting.
Before that, I used to get a Connection refused error, but now I'm getting the one above.
PostgreSQL is running fine on my system, on localhost port 5432 as default.
Is there a way for me to specify which browser pgadmin4 is supposed to use? I've been searching on google, but every result shows me a dialog box inside the pgadmin4 application, but the problem is that it won't even open on my machine to begin with.
Should I edit a config file somewhere in my system?
Upvotes: 1
Views: 3899
Reputation: 2022
First remove any existing pgadmin installed and then try this:
$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate
(pgadmin4) $ pip install pgadmin4
...
(pgadmin4) $ pgadmin4
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: [email protected]
Password:
Retype password:
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
* Serving Flask app "pgadmin" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
Official Documentation Link Answer Source
Upvotes: 5