I cannot update Ubuntu. Software updater does not work, nor does terminal update. Any suggestions that I can follow?

Asked by Tom G.

Software Updater does not update, nor does terminal work when I try to update. I get the following error using terminal:

E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/brave-browser-release.list
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list
E: The list of sources could not be read.
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/brave-browser-release.list
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list
E: The list of sources could not be read.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu software-properties Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Apparently you have made wrong modifications to the package management configuration files.
It should not be hard to repair that, but we need more information to give the right instructions.

Please provide the output that you receive for the following commands (to be executed in a terminal window):

uname -a
lsb_release -crid
cat -n /etc/apt/sources.list
cat -n /etc/apt/sources.list.d/brave-browser-release.list
cat -n /etc/apt/sources.list.d/elastic-7.x.list

Revision history for this message
Tom G. (ttgteacher) said :
#2

Linux dad-OptiPlex-9020 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

dad@dad-OptiPlex-9020:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

dad@dad-OptiPlex-9020:~$ cat -n /etc/apt/sources.list
     1 # deb cdrom:[Ubuntu 19.04 _Disco Dingo_ - Release amd64 (20190416)]/ disco main restricted
     2
     3 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     4 # newer versions of the distribution.
     5 deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
     6 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco main restricted
     7
     8 ## Major bug fix updates produced after the final release of the
     9 ## distribution.
    10 deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates restricted main
    11 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco-updates main restricted
    12
    13 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    14 ## team. Also, please note that software in universe WILL NOT receive any
    15 ## review or updates from the Ubuntu security team.
    16 deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
    17 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco universe
    18 deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
    19 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco-updates universe
    20
    21 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    22 ## team, and may not be under a free licence. Please satisfy yourself as to
    23 ## your rights to use the software. Also, please note that software in
    24 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    25 ## security team.
    26 deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
    27 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco multiverse
    28 deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
    29 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco-updates multiverse
    30
    31 ## N.B. software from this repository may not have been tested as
    32 ## extensively as that contained in the main release, although it includes
    33 ## newer versions of some applications which may provide useful features.
    34 ## Also, please note that software in backports WILL NOT receive any review
    35 ## or updates from the Ubuntu security team.
    36 # deb-src http://us.archive.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse
    37
    38
    39 deb http://security.ubuntu.com/ubuntu jammy-security restricted main
    40 # deb-src http://security.ubuntu.com/ubuntu disco-security main restricted
    41 deb http://security.ubuntu.com/ubuntu jammy-security universe
    42 # deb-src http://security.ubuntu.com/ubuntu disco-security universe
    43 deb http://security.ubuntu.com/ubuntu jammy-security multiverse
    44 # deb-src http://security.ubuntu.com/ubuntu disco-security multiverse
    45
    46 # This system was installed using small removable media
    47 # (e.g. netinst, live or single CD). The matching "deb cdrom"
    48 # entries were disabled at the end of the installation process.
    49 # For information about how to configure apt package sources,
    50 # see the sources.list(5) manual.
    51 deb http://us.archive.ubuntu.com/ubuntu/ jammy-backports multiverse universe restricted main

cat -n /etc/apt/sources.list.d/brave-browser-release.list
     1 “deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main”

Thank you, is this everything?

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#3

Based on your output you should do the following:

Open a terminal window and issue the command

sudo gedit /etc/apt/sources.list
In the editor window that opens after entering your password (for confirmation of an administrative action):
change all occurrences of "disco" by "jammy", except in the first line (that has to stay as it is)
save the file and close the editor

Then issue the command
sudo gedit /etc/apt/sources.list.d/brave-browser-release.list
In the editor window that opens:
remove the two quote characters (at the beginning and the end of the first line)
save the file and close the editor

Then issue the command
sudo gedit /etc/apt/sources.list.d/elastic-7.x.list
In the editor window that opens:
remove the two quote characters (at the beginning and the end of the first line)
save the file and close the editor
(You did not post the output of the contents of the elastic-7.x.list file, but I guess that there is the same cause as for the brave browser)

Revision history for this message
Tom G. (ttgteacher) said :
#4

ad@dad-OptiPlex-9020:~$ sudo gedit /etc/apt/sources.list.d/elastic-7.x.list
[sudo] password for dad:

** (gedit:10903): WARNING **: 12:32:51.580: Set document metadata failed: Setting attribute metadata::gedit-position not supported

Revision history for this message
Tom G. (ttgteacher) said :
#5

dad@dad-OptiPlex-9020:~$ sudo apt-get update
[sudo] password for dad:
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/brave-browser-release.list
E: The list of sources could not be read.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#6

Already written above:

Issue the command
sudo gedit /etc/apt/sources.list.d/brave-browser-release.list
In the editor window that opens:
remove the two quote characters (at the beginning and the end of the first line)
save the file and close the editor

(You can safely ignore the "Set document metadata" warning when editing the file.)

Revision history for this message
Tom G. (ttgteacher) said :
#7

Thank you Manfred, this worked! I can finally update my computer for the kids to use. I appreciate your patience and kindness sharing your help with my family.

Merry Christmas all!

Tom :)

Revision history for this message
Tom G. (ttgteacher) said :
#8

Thanks Manfred Hampl, that solved my question.