I tried to use
sudo apt-get install
its not working.
So I did ping google.com
it gave me
ping: unknown host google.com
I have net connection and I able to access Internet in browser.
How should I proceed?
I tried to use
sudo apt-get install
its not working.
So I did ping google.com
it gave me
ping: unknown host google.com
I have net connection and I able to access Internet in browser.
How should I proceed?
Which version do you use? Are you using proxy?
EDIT:
To use apt-get through a proxy, I do the following -
sudo apt-get --print-uris install PROGRAM
This prints the urls of the packages, so you can download them. For example, using supertux:
wilf@comp:~$ sudo apt-get install --print-uris supertux
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
supertux-data
The following NEW packages will be installed
supertux supertux-data
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 59.4 MB of archives.
After this operation, 80.0 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Then download the .deb files from the given links, through a browser that works through the proxy, and you can then install them using Software Centre, or using terminal by this command cd /FOLDER/WITH/DOWNLOADED-DEB-FILES; dpkg -i *.deb ER cd .... ; gdebi *.deb
. Slow and annoying, but seems to work.
EDIT2 : (Easy Method) (from help.ubuntu.com site)
APT configuration file method
This method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.
On some installations there will be no apt-conf file set up. This procedure will either edit an existing apt-conf file or create a new apt-conf file.
gksudo gedit /etc/apt/apt.conf
Add this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
Save the apt.conf file.
If your proxy needs a login/password, substitute:
"http://yourproxyaddress:proxyport";
with
"http://username:password@yourproxyaddress:proxyport";
Something like following should work fine
Acquire::http::proxy "http://lgn:pwd@192.168.1.254:8080/";
Acquire::https::proxy "http://lgn:pwd@192.168.1.254:8080/"