Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] 'apt-get update' is not working

$
0
0
Hi all,

I am new to Ubuntu. I have an Ubuntu VM. The details are as follows:

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Whenever I wanted to execute `apt-get update`, it gets stuck.
$ apt-get update
0% [Waiting for headers] [Waiting for headers]
0% [Waiting for headers] [Waiting for headers]


Steps which I have already done:
1. Temporary proxy session
$ export http_proxy=http://proxyip:proxyport
$ export https_proxy=http://proxyip:proxyport
$ apt-get update

2. APT configuration file method
$ vi /etc/apt/apt.conf.d/80proxy
Acquire::http::Proxy "http://proxyip:proxyport";
Acquire::https::Proxy "http://proxyip:proxyport";
$ apt-get update

3. BASH rc method
$ vi ~/.bashrc
http_proxy=http://proxyip:proxyport
https_proxy=http://proxyip:proxyport
export http_proxy
export https_proxy
$ source ~/.bashrc
$ apt-get update

4. Removed the sources.list
$ mv /etc/apt/sources.list /tmp/
$ apt-get clean
$ apt-get update

5. Removed /var/lib/apt/lists/*
$ rm -rf /var/lib/apt/lists/*
$ apt-get clean
$ apt-get update


This VM has intenet connection thru proxy. So I can wget packages from this VM.
But I need apt-get to work because my script will use apt-get to install the required packages. Please help me out on this.

Have a great day.

Regards,
Arunava

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>