0

im extremely new to ubuntu, and since yesterday i've been unable to update directly from the software center. i open terminal and try sudo apt-get update, but i get the error "

E: Malformed entry 52 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
E: Malformed entry 52 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read

Contents of sources.list:

deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
:

Answer by SirCharlo on How do I restore the default repositories? was my saving grace.

Kulfy
  • 17,696
DPS
  • 348
  • 2
    It would be useful to know what the 52nd entry in /etc/apt/sources.list is. – Jos Feb 01 '19 at 21:29
  • how do i find out? ill post the info if i can figure that out... – DPS Feb 01 '19 at 21:30
  • Open Terminal and run cat /etc/apt/sources.list and check line 52 – Kulfy Feb 01 '19 at 21:31
  • In a terminal, do less /etc/apt/sources.list and count the entries (which ought to begin with deb) until the 52nd. Then copy that line and paste it into your question, so we can have a look at it. – Jos Feb 01 '19 at 21:31
  • well, it seems i only have 32 entries when i run that. at least that begin with # – DPS Feb 01 '19 at 21:41
  • No, entries that begin with "#" are comments and don't count. – Jos Feb 01 '19 at 21:46
  • yeah, sorry. im completely lost on this. when i run the command you suggested, the term shows about 50 lines, in which around 30 are comments. so i have only few that dont begin with # – DPS Feb 01 '19 at 21:49
  • if it is, i apologize. i have NO knowledge with ubuntu. im 3 days into my first install – DPS Feb 01 '19 at 21:51
  • Can you copy the whole file onto pastebin.com and give us a link? – Jos Feb 01 '19 at 21:53
  • yes sure! one sce – DPS Feb 01 '19 at 21:54
  • https://pastebin.com/kG8ZHYVG – DPS Feb 01 '19 at 21:56
  • i think im getting somwhere. everything is updating. i didnt have any repositories selected, and other options were unchecked. i used one of the suggested answers. ill select which one helped! thank you guys so much for the help, and i look forward to working with you in the future :) – DPS Feb 01 '19 at 22:07

1 Answers1

0

Several lines appear to have gone missing, and a ":" has appeared where it shouldn't be.

  • In a terminal, enter sudo nano /etc/apt/sources.list and enter your password.
  • Remove the ":" and replace it by:

    deb http://security.ubuntu.com/ubuntu bionic-security main restricted 
    deb http://security.ubuntu.com/ubuntu bionic-security universe
    deb http://security.ubuntu.com/ubuntu bionic-security multiverse
    
  • Press Ctrl + O to save the file, and Ctrl + X to exit from nano.

  • Do sudo apt update.

It should work from here on.

Kulfy
  • 17,696
Jos
  • 29,224
  • thank you. right now, everything has started updating and my little i5 is currently "going through the motions". once this is finished, i will return to the terminal and correct the issues that youve found. if i can find them. lol. this wasnt an easy install, but you guys have been a life saver. thank you! – DPS Feb 01 '19 at 22:14
  • ALAS! A full restart, and not a single error! Thank you! – DPS Feb 01 '19 at 22:27
  • If you think my answer helped you, and you think this is not a duplicate of the questions above, please mark this question as "answered" by clicking the tick mark next to it. – Jos Feb 01 '19 at 22:29