Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] sudo apt-get update can not connect.

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
username2
Posts: 13
Joined: 2017-12-09 15:15

[SOLVED] sudo apt-get update can not connect.

#1 Post by username2 »

Hi, I' ve searched the internet all day but still no answer to my problem: i can' t update. The connection times out because it cannot connect with 10.0.0.251:3142
The same problem by using Synaptic trying to install packages
Internet works (wired + wifi); i'm using Buster

Any idea's how to fix this?
Last edited by username2 on 2017-12-10 13:43, edited 2 times in total.

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: sudo apt-get update can not connect.

#2 Post by arochester »

Your source list is messed up.

Linux Mint has no place on your sources list. If you click on the blue links for Linux Mint you will see: Not Found.

Deb-multimedia is not recommended.

Your sources list should look something like:
deb http://ftp.be.debian.org/debian/ testing main contrib non-free
deb http://ftp.be.debian.org/debian/ testing-updates main contrib non-free
deb http://security.debian.org/ testing/updates main
If you insist on deb-multimedia you will also need
deb [arch=amd64,i386] http://www.deb-multimedia.org testing main non-free
amd you will need the key
wget http://www.deb-multimedia.org/pool/main ... .1_all.deb && dpkg -i deb-multimedia-keyring_2016.8.1_all.deb

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#3 Post by username2 »

I have no idea what you mean. I'm quite new to Linux

Do i have Mint?? Buster was installed.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: sudo apt-get update can not connect.

#4 Post by GarryRicketson »

I have no idea what you mean. I'm quite new to Linux

Do i have Mint?? Buster was installed.
Then why do you have Mint repositories, ? Maybe you installed Mint,
we have no way of knowing.

Looks like a mess, the result of not read anything before installing and using Debian,...
https://wiki.debian.org/SourcesList
=============================

Maybe: I'm quite new to Linux, what do I need to know to install Debian
======================

https://www.debian.org/doc/manuals/debi ... ng.en.html
==========================
https://www.debian.org/intro/about
And there is much more, please read some of the documentation, after
you have done that, and if you still have questions, of course feel free to ask.

Debian, is a Linux distribution, but it is not the same as other Linux distributions, they are all different,..they all have their own package repositories, special for each distribution, mixing repositories and various
Linux distributions does not work well. Even more so with some one new to it all, but new Linux users, often fail to understand that, especially when they do not read anything about the distribution, nor linux, before trying it.
https://wiki.debian.org/DontBreakDebian
Don't make a FrankenDebian

Debian Stable should not be combined with other releases. If you're trying to install software that isn't available in the current Debian Stable release, it's not a good idea to add repositories for other Debian releases. The problems might not happen right away, but the next time you install updates.

The reason things can break is because the software packaged for one Debian release is built to be compatible with the rest of the software for that release. For example, installing packages from buster on a stretch system could also install newer versions of core libraries including libc6. This results in a system that is not testing or stable but a broken mix of the two.

Repositories that can create a FrankenDebian if used with Debian Stable:

Debian testing release (currently buster)

Debian unstable release (also known as sid)

Ubuntu, Mint or other derivative repositories are not compatible with Debian!
Ubuntu PPAs
It appears , you are not running Debian testing (will be Buster, when released), nor any other Linux distro, you are running a Farnkie---- something,
maybe Linux Mint, maybe Buster, or some strange mutation that has occurred,
using the http://www.deb-multimedia.org/ repos,...
Good luck,...

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: sudo apt-get update can not connect.

#5 Post by RU55EL »

username2 wrote:I have no idea what you mean. I'm quite new to Linux

Do i have Mint?? Buster was installed.
If you are new to Linux you should install Debian Stable (Stretch) rather than Buster. Choosing a Debian distribution. As it is, you probably need to reinstall, with "http://packages.linuxmint.com/" in your sources.list file, you have created a FrankenDebian.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: sudo apt-get update can not connect.

#6 Post by GarryRicketson »

We posted almost at the same time, but that is ok, it confirms the advice and info, when more then 1 member says the same thing, but in different ways.
I admire, how you shorten it up into a few, easy to follow state ments and links.
I know, I tend to get to long, and it is harder to follow,... thanks

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#7 Post by username2 »

is this what you mean? In /etc/apt/sources.list.d/ are these docs:
debian.list:

Code: Select all

deb http://ftp.be.debian.org/debian testing main contrib non-free
deb http://ftp.be.debian.org/debian testing-updates main contrib non-free
deb http://ftp.be.debian.org/debian-security testing/updates main contrib non-free
deb http://www.deb-multimedia.org testing main non-free
#deb http://www.deb-multimedia.org stretch-backports main
#deb http://ftp.be.debian.org/debian stable main contrib non-free
#deb http://ftp.be.debian.org/debian sid main contrib non-free
#deb http://ftp.be.debian.org/debian experimental main contrib non-free
various.list:

Code: Select all

deb http://packages.linuxmint.com/ betsy main upstream import backport romeo

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: sudo apt-get update can not connect.

#8 Post by RU55EL »

username2 wrote:is this what you mean? In /etc/apt/sources.list.d/ are these docs:
debian.list:

Code: Select all

deb http://ftp.be.debian.org/debian testing main contrib non-free
deb http://ftp.be.debian.org/debian testing-updates main contrib non-free
deb http://ftp.be.debian.org/debian-security testing/updates main contrib non-free
deb http://www.deb-multimedia.org testing main non-free
#deb http://www.deb-multimedia.org stretch-backports main
#deb http://ftp.be.debian.org/debian stable main contrib non-free
#deb http://ftp.be.debian.org/debian sid main contrib non-free
#deb http://ftp.be.debian.org/debian experimental main contrib non-free
This is a classic example of FrankenDebian!

You need to spend some time reading the links posted for you!

I wonder what is in your /etc/apt/source.list file?

After reading the material at the links, you should re-install with Debian stable.

Debian is an excellent operating system, but it does tend to require you to do a lot of reading to understand how to use it properly. In the long run, the time spent learning a little about Debian is well worth the trouble.

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#9 Post by username2 »

Program was installed by someone mentioned on ubuntu site to ask for support, looked for someone in my neighbourhood.


/etc/apt/source.list file:

Code: Select all

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# See sources.list(5) for more information, especialy remember that you can   #
# only use http, ftp or file URIs, CDROMs are managed through apt-cdrom.      #
#                                                                             #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Please use /etc/apt/sources.list.d/ instead of this file and create a       #
# separate *.list configuration file for each repository, containing the      #
# actual deb/deb-src desired suites and components for that repository.       #
#                                                                             #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#   /etc/apt/sources.list.d/debian.list                                       #
#   /etc/apt/sources.list.d/various.list                                      #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#10 Post by username2 »

thanks for your answers. Gonne try to do a reinstall by myself

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: sudo apt-get update can not connect.

#11 Post by p.H »

username2 wrote: Gonne try to do a reinstall by myself
Stop ! until you read my answer.

Guys, whether the sources.list is messed up and makes a FrankenDebian is irrelevant with the error message.
I do not understand Dutch language (is it Dutch ?) but it looks like apt tries and fails to connect to address 10.0.0.251 on port 3142 on some way. You could print the default English message by prefixing the command with "LANG=C" (without the quotes).

1) This is a private address. No public mirror has such an address.
2) This is not the standard HTTP port (80). No public mirror listens on this port.

My guess is that you configured apt to use an HTTP proxy at this address and port. Check for http_proxy in the environment variables displayed by the command "set", and for "http::Proxy" in the files /etc/apt/apt.conf and /etc/apt/apt.conf.d/*.

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#12 Post by username2 »

p.H wrote:
username2 wrote: Gonne try to do a reinstall by myself
Stop ! until you read my answer.

My guess is that you configured apt to use an HTTP proxy at this address and port. Check for http_proxy in the environment variables displayed by the command "set", and for "http::Proxy" in the files /etc/apt/apt.conf and /etc/apt/apt.conf.d/*.
Yes, it's Dutch

If i check terminal after " set" there is no http or proxy in that.
in /etc/apt/apt.conf.d/ there is a file called 02proxy whitch contains:

Code: Select all

Acquire::http { Proxy "http://10.0.0.251:3142"; };
there is no /etc/apt/apt.conf

and in English:

Code: Select all

roel@opmaat:~$ LANG=C sudo apt-get update
[sudo] password for roel: 
Err:1 http://ftp.be.debian.org/debian testing InRelease                                                                   
  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
Err:2 http://www.deb-multimedia.org testing InRelease                                                                     
  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
Err:3 http://packages.linuxmint.com betsy InRelease                                                                       
  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
Err:4 http://ftp.be.debian.org/debian testing-updates InRelease                                                           
  Unable to connect to 10.0.0.251:3142:
Err:5 http://ftp.be.debian.org/debian-security testing/updates InRelease
  Unable to connect to 10.0.0.251:3142:
Reading package lists... Done
W: Failed to fetch http://ftp.be.debian.org/debian/dists/testing/InRelease  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
W: Failed to fetch http://ftp.be.debian.org/debian/dists/testing-updates/InRelease  Unable to connect to 10.0.0.251:3142:
W: Failed to fetch http://ftp.be.debian.org/debian-security/dists/testing/updates/InRelease  Unable to connect to 10.0.0.251:3142:
W: Failed to fetch http://www.deb-multimedia.org/dists/testing/InRelease  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
W: Failed to fetch http://packages.linuxmint.com/dists/betsy/InRelease  Could not connect to 10.0.0.251:3142 (10.0.0.251), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: sudo apt-get update can not connect.

#13 Post by dilberts_left_nut »

Yes, the current error is caused by the proxy you have set is not working.
When you solve that, your system is likely to explode sooner or later because of your mixed sources.
AdrianTM wrote:There's no hacker in my grandma...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: sudo apt-get update can not connect.

#14 Post by p.H »

If this proxy does not exist or does not work you can comment the line by prefixing it with "//" (C-style comment). Or remove the file. If a proxy is mandatory, you need to fix the line or the proxy.

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#15 Post by username2 »

p.H wrote:If this proxy does not exist or does not work you can comment the line by prefixing it with "//" (C-style comment).
Oke, this works. Thanks

Is it safe to downgrade to stabel or is t better to do reinstall of testing? Seems to you guys that i will get in trouble with my current version

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: sudo apt-get update can not connect.

#16 Post by dilberts_left_nut »

"Downgrading" would be problematic - many transitions are effectively one-way, and while it may actually be possible, given enough knowledge and effort, thats not likely a worthwhile investment.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: sudo apt-get update can not connect.

#17 Post by GarryRicketson »

It is not so much a problem with the version your using, but with all the mixed
sources, it is in kind of in a unpredictable state.
One thing that might be good for you to know, look at the apt-get manual,

Code: Select all

man apt-get
, there is a -s option, this simulates, but does not actually make any changes, it helps to show what will happen if you perform the
actual command.
I don't want to tell you you should re-install, or not, if it is a new system for you,
and you don't have much personal files,and special programs that you want, doing a fresh , clean install properly probably is best , in my opinion.
Re-installing testing, probably is not a good idea for a beginner, re-installing
the current stable version, Debian 9 stretch would be best.
Probably it is best not to do anything, until you have read more documentation,
then you will be able to decide what would be best for you. Just keep in mind,
what DLN said:
dilberts_left_nut wrote:Post by dilberts_left_nut » 2017-12-09 13:44
Yes, the current error is caused by the proxy you have set is not working.
When you solve that, your system is likely to explode sooner or later because of your mixed sources.
Make sure you keep back up /copies of important data or files, so if and when
it all comes tumbling down, and it won't run, you have copies of your files, you
can use after a fresh install. A full system back up is not going to be of much use, it would be a copy /clone of a problematic system,... hope that makes sense, when you translate .

username2
Posts: 13
Joined: 2017-12-09 15:15

Re: sudo apt-get update can not connect.

#18 Post by username2 »

Thnxs guys for all your wise words and help

1byte
Posts: 59
Joined: 2017-07-16 06:51

Re: sudo apt-get update can not connect.

#19 Post by 1byte »

username2 wrote:Thnxs guys for all your wise words and help
Have you started with fresh installation yet?
I am just curious ...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [SOLVED] sudo apt-get update can not connect.

#20 Post by stevepusser »

From what I gather, the original installation was done by someone else...a "geek" that actually did him no favors.

You might be happier with a Debian derivative distribution that makes things easier for beginners.
MX Linux packager and developer

Post Reply