cancel
Showing results for 
Search instead for 
Did you mean: 

apt-get problem

SOLVED
Go to solution
heaman1
Regular Advisor

apt-get problem

When I try to install package to the server , it pop the below messages , I check the file /etc/apt/sources.list , it is normal and no proxy is required to connect to internet , could advise what is wrong in my system ? thx
9 REPLIES
Ivan Krastev
Honored Contributor

Re: apt-get problem

What is the message and what is in your sources.list file?

regards,
ivan
Ragu_3
Trusted Contributor
Solution

Re: apt-get problem

Check whether the apt-get repositories inside /etc/apt/sources.list are resolvable and reachable. What is the error returned by apt-get?
Debian GNU/Linux for the Enterprise! Ask HP ...
dirk dierickx
Honored Contributor

Re: apt-get problem

it's going to be hard to provide a solution with the error message missing.
Steven E. Protter
Exalted Contributor

Re: apt-get problem

Shalom,

Could just be a temporary internet connectivity issue. Try again and post the error message?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fredrik.eriksson
Valued Contributor

Re: apt-get problem

Could also be that the package list is outdated and the package version cannot be found on the repository.

apt-get update will solve that.

But there's no way of knowing what the problem could be unless you atleast post the error message

Best Regards
Fredrik Eriksson
heaman1
Regular Advisor

Re: apt-get problem

I can't browse to internet as the server do not have gui mode installed .

I can't ping www.yahoo.com as the firewall is not allowed to ping

for DNS and route -n , I checked that all these settings in all servers is the same , but some server can use apt-get , but some can't , can advise what is the possible reason some server can't use apt-get ,

p.s. they are in same server farm , same segment .


error
=====

apt-get install tftp
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
tftp
0 upgraded, 1 newly installed, 0 to remove and 66 not upgraded.
Need to get 15.9kB of archives.
After unpacking 45.1kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
tftp
Install these packages without verification [y/N]? y
Err http://ftp.hk.debian.org etch/main tftp 0.17-15
Could not resolve 'ftp.hk.debian.org'
Failed to fetch http://ftp.hk.debian.org/debian/pool/main/n/netkit-tftp/tftp_0.1
7-15_i386.deb Could not resolve 'ftp.hk.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-mis

sources.list
============
70407-11:29]/ etch contrib main

0407-11:29]/ etch contrib main

# Line commented out by installer because it failed to verify:
#deb http://security.debian.org/ etch/updates main contrib
# Line commented out by installer because it failed to verify:
#deb-src http://security.debian.org/ etch/updates main contrib


deb http://security.debian.org/ etch/updates main contrib

Fredrik.eriksson
Valued Contributor

Re: apt-get problem

If your machine cannot connect to the internet it can't download the files via apt-get either unless you have a internal mirror.

Depending on what your sources.list says you're probably using either of http or ftp.

1) You can try to ftp to a external ftp site to see if you're allowed to do that.
2) You can use wget, curl or lynx/links to surf to a webpage.
3) You can use nslookup/host/dig to check if you're allowed to do DNS lookups properly.

This is ofcourse unless you have full access to your firewall and can check what's allowed or not.

Also if you have set up any IPTables rules that might be a source of error.
(iptables -nvL will list all iptables rules set in FORWARD, INPUT, OUTPUT and also any chains that is built)

Best regards
Fredrik Eriksson
Elmar P. Kolkman
Honored Contributor

Re: apt-get problem

Your system is not correctly connected to the internet, so it won't work. This can be concluded from the message:
> "Could not resolve 'ftp.hk.debian.org'"

Fix the machine until 'dig ftp.hk.debian.org' gives back a valid IP address. After that you can try again to have apt-get working.
Every problem has at least one solution. Only some solutions are harder to find.
Mike Stroyan
Honored Contributor

Re: apt-get problem

Hmm. This topic certainly was sleeping for quite a while.
Note that success with "dig" or "host" may not mean that apt-get will succeed for host lookup.
If a proxy is specified by http_proxy environment variable or by a config file in /etc/apt/apt.conf.d/ then the proxy system would actually be doing the DNS lookup.