Score:3

sudo apt update: Malformed entry 1 in list file /etc/apt/sources.list.d/pgdg.list

dk flag

I have been trying to install pgadmin4 for a while, (but no success) so I can have a GUI to navigate postgresql server. Don't why but simple update command is also failing now. What did I do? where is wrong?

kia@fficeUbuntu:~$ sudo apt update && sudo apt full-upgrade
[sudo] password for kia: 
E: Malformed entry 1 in list file /etc/apt/sources.list.d/pgdg.list (Suite)
E: The list of sources could not be read.

Present contents of /etc/apt/sources.list.d/pgdg.list:

deb http://apt.postgresql.org/pub/repos/apt/
jammy-pgdg main

enter image description here

how to rectify this problem?

update: as per accepted answer, this fixed it.

enter image description here

Score:4
pl flag

It's split across two lines, and shouldn't be. The jammy-pgdg main should be immediately after the apt/ then a space. So:

deb http://apt.postgresql.org/pub/repos/apt/ jammy pgdg-main

All on one line.

Mainland avatar
dk flag
Wow that was an easy fix but hard to find. My only question is: how, why and when it went to the next line? I am sure I have not opened this file before? was it due to some bad installation?
pl flag
Likely a simple copy and paste error. It's easily done, we've all been there. Glad it's fixed.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.