I can't do sudo apt-get update and upgrade

Each time i try to run sudo apt-get update, and sudo apt-get upgrade it freezes for a long time, and then throw out a bunch of error / warning messages like:

Err:1 https://dl.yarnpkg.com/debian stable/main amd64 yarn all 1.12.3-1
Failed to connect to dl.yarnpkg.com port 443: Connection timed out
Err:2 https://deb.nodesource.com/node_10.x stretch/main amd64 nodejs amd64 10.15.3-1nodesource1
Connection timed out after 120008 milliseconds
Err:3 http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6/main amd64 mongodb-org-shell amd64 3.6.9
Could not connect to repo.mongodb.org:80 (99.84.229.104), connection timed out
Err:4 http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6/main amd64 mongodb-org-server amd64 3.6.9
Unable to connect to repo.mongodb.org:http:
Err:5 http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6/main amd64 mongodb-org-mongos amd64 3.6.9
Unable to connect to repo.mongodb.org:http:
Err:6 http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6/main amd64 mongodb-org-tools amd64 3.6.9 … [a whole lot more]

It's a Debian 9 server running apache.

Can anyone help with this?

1 Reply

It looks like your Linode isn't able to connect to those repos. I'd double check with the following:

curl -I

For example:

curl -I http://repo.mongodb.org/apt/debian/

That should return a '200 OK' response. If it doesn't, check to see if other sites work for you:

curl -I google.com

From there, if you can't reach any site then I'd look into your Linode's networking and DNS resolution. If you can't reach just those repos specifically, there might be a connectivity problem between your Linode and the repo. I'd recommend using MTR to double check the route:

mtr -rwbzc 100 http://repo.mongodb.org

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct