-1

I will describe my problem:

1) I installed ubuntu server 16.04.3 LTS on an HP Proliant DL380 G7 server using a bootable USB stick.

2) As soon as the installation is finished, I wanted to update the system with the command: sudo apt-get update but an error appeared to me:

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

-> the contents of the /etc/apt/sources.list file is as follows:

Ubuntu Update Rest
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates

deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-update

3) I have an ethernet cable connects from my server to the router.

4) My network interface is a bit weird, I do not understand why it is of this form enp13s0f0 and not eth0 !!!

So if someone has an answer, it will help me a lot because I am blocked :(

Robert Riedl
  • 4,351

1 Answers1

1

Your /etc/apt/sources.list seems to have been modified, one trivial thing that is missing is the component, it should at least look like this :

Ubuntu Update Rest
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main

deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-update main

And about your network interface name, eth0 is no more in use, since this name can change from one boot to anoter, see predictable network interface name. But if you really want it to be named eth0, this old behavior can be restored like described here.

pim
  • 3,280
  • Thank you very much @pim for the answer, but the problem persists. the error is as follows :

    Err: 1 http://de.archive.ubuntu.com/ubuntu xenial-updates InRelease         Temporary failure resolving 'from.archive.ubuntu.com'

    Err: 2 http://de.archive.ubuntu.com/ubuntu xenial-update InRelease         Temporary failure resolving 'from.archive.ubuntu.com'

    – Hassine H'maied Feb 28 '18 at 13:37
  • Now either you've got no internet, either there are other problems in your file. I think you don't have the original file anymore? – pim Feb 28 '18 at 13:47
  • Here is my /etc/apt/sources.list: https://gist.githubusercontent.com/RandomReaper/d625d2f149f23b4228944678d25d898c/raw/53eb78a0c3038663ab9e2d41b6c96d1055ace32c/sources.list feel free to try it. If it works, you can still replace the ch.archive... by de.archive.... – pim Feb 28 '18 at 13:52
  • No I do not have internet either I am connected with an ethernet cable from the server to the router but the internet does not work.

    I will try to replace my file /etc/apt/sources.list but the problem is that I can not copy to paste on the screen of my desktop since I am on a laptop and I write to you from my personal computer. I have to write it with my hand?

    – Hassine H'maied Feb 28 '18 at 14:03
  • If you don't have internet, there is no need trying to install software form it. First of all fix your internet connection. – pim Feb 28 '18 at 14:41
  • the problem is that i have an address enp13s0f0 which has a @ static 192.168.2.161 and l @ of my router which is connected to the server through an ethernet network cable is 192.168.2.160.

    I put a @ network 192.168.2.0 and the gateway 192.168.2.160 which is the @ of the router.

    Is this correct?

    – Hassine H'maied Mar 01 '18 at 07:44
  • Please if you can help me to configure my internet connection because i'm new at ubuntu server and i want to learn more about this practices. – Hassine H'maied Mar 01 '18 at 07:46
  • tell me what information you need. – Hassine H'maied Mar 01 '18 at 07:47
  • Have a look at how other host are configured on the network, then copy/adjust the configuration for your machine. Otherwise open another question for the network configuration – pim Mar 01 '18 at 07:56