Running a Lenovo T460, I have found a “no entry” (red circle with white rectangle) icon in the top right icons. Clicking this ‘An error occurred. Please run package manager . .the error message was: Opening the cache (E: Malformed entry 1 in sources file / etc / apt / sources.list.d/third-party sources (URI parse). E: The list of sources could not be read)’.
Trying to run Synaptic Package manager fails, producing the message:
“E: Malformed entry 1 in sources file /etc/apt/sources.list.d/third-party.sources (URI parse)
E: The list of sources could not be read.
E: _cache->open() failed, cannot continue.”
Clicking “Software and Upgrades” to start that produces no result.
I guess I have a corrupted file which needs replacing, and have access to another computer, but what file and where to replace?
Relevant System Information
Lenovo T460 (getting old - could be a hardware problem??)
Error Messages / Logs
andrew@andrew-thinkpad-b-t460:~$ sudo apt update
[sudo] password for andrew:
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/third-party.sources (URI parse)
E: The list of sources could not be read.
What I’ve Tried
I can’t see how to get round the updating problem.
Is but a text file, and is fixable in all likely hood.
Let us start this process by looking at what there is to work with.
post back - between code tags - the terminal results from the command:
The directory “/etc/apt/sources.list.d/third-party.sources” does not exist on my 24.04 install, What is needed is to know if “ubuntu.sources” does exist. Then insure that is the target to direct apt to.
Whether it exists on your system or a fresh Ubuntu install is irrelevant. It obviously exists on the OP’s system, and is causing the error: 'E: Malformed entry 1 in sources file /etc/apt/sources.list.d/third-party.sources (URI parse)'
Most likely, user typo’d or copy/pasted something incorrectly.