I checked the duplicate questions with
Hash Sum mismatch
And ran these commands
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
Things ran okay till I tried to install apache2 using the command
sudo apt-get install apache2
Which is when I get a Hash Sum Mismatch and also Bad header line Bad header data
Err:3 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 liblua5.2-0 amd64 5.2.4-1.1build1
Bad header line Bad header data [IP: 192.168.1.151 808]
Fetched 19.4 kB in 3s (7,756 B/s)
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/a/apr-util/libaprutil1-ldap_1.6.1-2_amd64.deb Hash Sum mismatch
Hashes of expected file:
- SHA256:77045fb05b8db8960e6dcdc6339141781a13719bbc2d94452b762fdbbcc9c9fe
- SHA1:6e6549483a1a60dd027c141e5a0d6fe2facad3a5 [weak]
- MD5Sum:ab9dde6f6554add8d4100974bb907363 [weak]
- Filesize:8764 [weak]
Hashes of received file:
- SHA256:c0ee4206cdf0ce092b33ad56b5d230979cc1ec3666df6ab2b5282bb058ebd304
- SHA1:86cd9504ec5ac110e3476381c01156ba11f03b73 [weak]
- MD5Sum:a4faf00c1562fdfd8af187053422aa25 [weak]
- Filesize:8764 [weak]
Last modification reported: Tue, 27 Feb 2018 09:19:27 +0000
I also checked the question to use internet through a proxy address.
The IP 192.168.1.151:808 in the error code is a proxy address for accessing the internet. I am using it by mentioning the following lines in the /etc/apt/apt.conf
file
Acquire::http::Proxy "http://192.168.1.151:808";
Acquire::https::Proxy "http://192.168.1.151:808";
Acquire::ftp::Proxy "http://192.168.1.151:808";
How can I install apache2 without any errors?
sudo apt install
instead ofsudo apt-get install
. – Harish Aug 22 '18 at 10:14mysql
– Harish Aug 22 '18 at 10:24sudo apt-get install
instead ofsudo apt install
has fixed the problem. – Harish Aug 22 '18 at 11:54