0

When i try to update or install any software using the terminal for Ubuntu 18.4 it shows the following:

jean@jean-Latitude-E5550:~$ sudo apt install update
[sudo] password for jean: 
E: Malformed entry 48 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
E: Malformed entry 48 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
jean@jean-Latitude-E5550:~$ 

And also it shows in color everything, so help me guys, please help me????

andrew.46
  • 38,003
  • 27
  • 156
  • 232
  • check /etc/apt/sources.list, this is the file that contains the repository list. check this link: https://gist.github.com/jackw1111/d31140946901fab417131ff4d9ae92e3 it contains the default repository list for Ubuntu 18.04. Copy the content to /etc/apt/sources.list – singrium Nov 09 '18 at 10:58
  • The terminal cannot install or execute anything. – Jean Dedieu Rwasa Nov 09 '18 at 10:58
  • 2
    The command is wrong, post the output of: sudo apt update – abu_bua Nov 09 '18 at 11:15

1 Answers1

1

Run sudo gedit /etc/apt/sources.list
Delete all the content you find in this file and Copy this to the file:

#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ 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
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

Save and close the file.
Run sudo apt update
Then sudo apt upgrade

singrium
  • 6,880
  • it requested to continue by the command below "Do you want to continue? [Y/n] y" and then the last line says "Processing triggers for libc-bin (2.27-3ubuntu1) ... Is there anything else before i close????? – Jean Dedieu Rwasa Nov 09 '18 at 11:17
  • Yes, after running sudo apt update, you will be asked to type you r password, then it will do the update. It is the same for sudo apt upgrade too: type your password then enter – singrium Nov 09 '18 at 11:19
  • 3
    @JeanDedieuRwasa Please read the "Posible duplicate" above and ignore this answer. Two reasons: (1) It tells you to do a dangerous operation - running graphical apps with sudo and (2) instead of solving the actual error mentioned it goes the easy way of reseting the repositories to the default ones ignoring if you have and need any others. –  Nov 09 '18 at 11:20
  • If it asks you to continue, press 'Y' key, then update and upgrade will be done – singrium Nov 09 '18 at 11:20
  • I agree with @GabrielaGarcia, this answer is the easy way to do it. but it is effective and solve the problem. If you want the complicated way, follow the steps explained in the 'duplicate' link. – singrium Nov 09 '18 at 11:23
  • 2
    @singrium You should also notice a fundamental difference: The duplicate uses sudo -H. Again, using sudo with graphical apps may result in changing permissions in the user space, a way more complicated problem than the one we're dealing here. –  Nov 09 '18 at 11:25
  • Thank you so much guys for helping me. It is now working – Jean Dedieu Rwasa Nov 09 '18 at 11:29