apt-get cannot connect “failure resolving 'archive.ubuntu.com'”apt-get install giving 404Ubuntu cannot resolve unmet dependencyHow do I ask apt-get to skip any interactive post-install configuration steps?How do I get apt-get to ignore some dependencies?apt-get update can not connectUbuntu 12.04: apt-get “failed to fetch”; apt is trying to fetch via old static IPKVM Ubuntu Guest cannot connect to the internet on bridged networkingUbuntu14.04 - unable to apt-get updateUnable to install CURL on Docker Ubuntu imagePrivate repo over ssh, apt-get ignoring packages
GPS Rollover on Android Smartphones
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why don't electron-positron collisions release infinite energy?
Banach space and Hilbert space topology
Is there a familial term for apples and pears?
Email Account under attack (really) - anything I can do?
How to report a triplet of septets in NMR tabulation?
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
How to get the available space of $HOME as a variable in shell scripting?
Continuity at a point in terms of closure
Find original functions from a composite function
Shell script can be run only with sh command
How old can references or sources in a thesis be?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
What is the offset in a seaplane's hull?
Suffixes -unt and -ut-
"which" command doesn't work / path of Safari?
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
How is this relation reflexive?
How long does it take to type this?
Why is an old chain unsafe?
What would the Romans have called "sorcery"?
Do any Labour MPs support no-deal?
How do I create uniquely male characters?
apt-get cannot connect “failure resolving 'archive.ubuntu.com'”
apt-get install giving 404Ubuntu cannot resolve unmet dependencyHow do I ask apt-get to skip any interactive post-install configuration steps?How do I get apt-get to ignore some dependencies?apt-get update can not connectUbuntu 12.04: apt-get “failed to fetch”; apt is trying to fetch via old static IPKVM Ubuntu Guest cannot connect to the internet on bridged networkingUbuntu14.04 - unable to apt-get updateUnable to install CURL on Docker Ubuntu imagePrivate repo over ssh, apt-get ignoring packages
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Just got a new VPS running Ubuntu 11.04 and tried to update it. I got this error. I get the same error whenever using apt-get
login as: root
root@199.193.248.80's password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Last login: Mon May 7 19:55:45 2012 from 108.192.44.54
root@Rx:~# apt-get update
Err http://security.ubuntu.com natty-security InRelease
Err http://archive.ubuntu.com natty InRelease
Err http://security.ubuntu.com natty-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com natty-updates InRelease
Err http://archive.ubuntu.com natty Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Err http://archive.ubuntu.com natty-updates Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@Rx:~#
If needed, here is my /etc/apt/sources.list
root@Rx:/etc# more /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu natty main
deb http://archive.ubuntu.com/ubuntu natty-updates main
deb http://security.ubuntu.com/ubuntu natty-security main
deb http://archive.ubuntu.com/ubuntu natty universe
deb http://archive.ubuntu.com/ubuntu natty-updates universe
And if needed, I did a ping test:
root@Rx:~# ping -n 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=13.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=13.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=56 time=13.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms
root@Rx:~#
This is /etc/resolv.conf
root@Rx:~# more /etc/resolv.conf
nameserver 199.193.248.1
ubuntu apt
add a comment |
Just got a new VPS running Ubuntu 11.04 and tried to update it. I got this error. I get the same error whenever using apt-get
login as: root
root@199.193.248.80's password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Last login: Mon May 7 19:55:45 2012 from 108.192.44.54
root@Rx:~# apt-get update
Err http://security.ubuntu.com natty-security InRelease
Err http://archive.ubuntu.com natty InRelease
Err http://security.ubuntu.com natty-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com natty-updates InRelease
Err http://archive.ubuntu.com natty Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Err http://archive.ubuntu.com natty-updates Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@Rx:~#
If needed, here is my /etc/apt/sources.list
root@Rx:/etc# more /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu natty main
deb http://archive.ubuntu.com/ubuntu natty-updates main
deb http://security.ubuntu.com/ubuntu natty-security main
deb http://archive.ubuntu.com/ubuntu natty universe
deb http://archive.ubuntu.com/ubuntu natty-updates universe
And if needed, I did a ping test:
root@Rx:~# ping -n 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=13.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=13.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=56 time=13.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms
root@Rx:~#
This is /etc/resolv.conf
root@Rx:~# more /etc/resolv.conf
nameserver 199.193.248.1
ubuntu apt
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
Try adding a line in resolv.conf withnameserver 8.8.8.8.
– NathanG
May 8 '12 at 2:37
I did get these messages when runningapt-get upgradecryptsetup: WARNING: failed to detect canonical device of /dev/xvda1cryptsetup: WARNING: could not determine root device from /etc/fstabbut otherwise it seems to work good
– dukevin
May 8 '12 at 2:41
add a comment |
Just got a new VPS running Ubuntu 11.04 and tried to update it. I got this error. I get the same error whenever using apt-get
login as: root
root@199.193.248.80's password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Last login: Mon May 7 19:55:45 2012 from 108.192.44.54
root@Rx:~# apt-get update
Err http://security.ubuntu.com natty-security InRelease
Err http://archive.ubuntu.com natty InRelease
Err http://security.ubuntu.com natty-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com natty-updates InRelease
Err http://archive.ubuntu.com natty Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Err http://archive.ubuntu.com natty-updates Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@Rx:~#
If needed, here is my /etc/apt/sources.list
root@Rx:/etc# more /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu natty main
deb http://archive.ubuntu.com/ubuntu natty-updates main
deb http://security.ubuntu.com/ubuntu natty-security main
deb http://archive.ubuntu.com/ubuntu natty universe
deb http://archive.ubuntu.com/ubuntu natty-updates universe
And if needed, I did a ping test:
root@Rx:~# ping -n 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=13.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=13.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=56 time=13.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms
root@Rx:~#
This is /etc/resolv.conf
root@Rx:~# more /etc/resolv.conf
nameserver 199.193.248.1
ubuntu apt
Just got a new VPS running Ubuntu 11.04 and tried to update it. I got this error. I get the same error whenever using apt-get
login as: root
root@199.193.248.80's password:
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Last login: Mon May 7 19:55:45 2012 from 108.192.44.54
root@Rx:~# apt-get update
Err http://security.ubuntu.com natty-security InRelease
Err http://archive.ubuntu.com natty InRelease
Err http://security.ubuntu.com natty-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com natty-updates InRelease
Err http://archive.ubuntu.com natty Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Err http://archive.ubuntu.com natty-updates Release.gpg
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@Rx:~#
If needed, here is my /etc/apt/sources.list
root@Rx:/etc# more /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu natty main
deb http://archive.ubuntu.com/ubuntu natty-updates main
deb http://security.ubuntu.com/ubuntu natty-security main
deb http://archive.ubuntu.com/ubuntu natty universe
deb http://archive.ubuntu.com/ubuntu natty-updates universe
And if needed, I did a ping test:
root@Rx:~# ping -n 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=13.3 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=56 time=13.2 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=56 time=13.4 ms
64 bytes from 8.8.8.8: icmp_req=4 ttl=56 time=13.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 13.243/13.326/13.428/0.066 ms
root@Rx:~#
This is /etc/resolv.conf
root@Rx:~# more /etc/resolv.conf
nameserver 199.193.248.1
ubuntu apt
ubuntu apt
edited May 8 '12 at 2:29
dukevin
asked May 8 '12 at 2:20
dukevindukevin
1,16531325
1,16531325
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
Try adding a line in resolv.conf withnameserver 8.8.8.8.
– NathanG
May 8 '12 at 2:37
I did get these messages when runningapt-get upgradecryptsetup: WARNING: failed to detect canonical device of /dev/xvda1cryptsetup: WARNING: could not determine root device from /etc/fstabbut otherwise it seems to work good
– dukevin
May 8 '12 at 2:41
add a comment |
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
Try adding a line in resolv.conf withnameserver 8.8.8.8.
– NathanG
May 8 '12 at 2:37
I did get these messages when runningapt-get upgradecryptsetup: WARNING: failed to detect canonical device of /dev/xvda1cryptsetup: WARNING: could not determine root device from /etc/fstabbut otherwise it seems to work good
– dukevin
May 8 '12 at 2:41
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
Try adding a line in resolv.conf with
nameserver 8.8.8.8.– NathanG
May 8 '12 at 2:37
Try adding a line in resolv.conf with
nameserver 8.8.8.8.– NathanG
May 8 '12 at 2:37
I did get these messages when running
apt-get upgrade cryptsetup: WARNING: failed to detect canonical device of /dev/xvda1 cryptsetup: WARNING: could not determine root device from /etc/fstab but otherwise it seems to work good– dukevin
May 8 '12 at 2:41
I did get these messages when running
apt-get upgrade cryptsetup: WARNING: failed to detect canonical device of /dev/xvda1 cryptsetup: WARNING: could not determine root device from /etc/fstab but otherwise it seems to work good– dukevin
May 8 '12 at 2:41
add a comment |
2 Answers
2
active
oldest
votes
The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. 8.8.8.8 (provided by Google) is the easiest to remember.
Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server.
If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use 8.8.8.8 as your primary DNS forever.
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
The address(es) in your/etc/resolv.confare your DNS resolvers. They have little to no relation to the IP address of your server.
– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
add a comment |
In Ubuntu 18.04 /etc/resolv.conf file managed by systemd-resolved and must not be edited. You must add right nameserver (8.8.8.8) to /etc/netplan/*.yaml here:
nameservers:
addresses: [..., 8.8.8.8]
Manually, or by this oneliner, if string addresses: is only one in the file)
sed -r 's/(addresses: [.*)]/1, 8.8.8.8]/g' /etc/netplan/01-netcfg.yaml |
sudo tee /etc/netplan/01-netcfg.yaml &&
sudo netplan apply
(This is ubuntu server and one file 01-netcfg.yaml)
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f386918%2fapt-get-cannot-connect-failure-resolving-archive-ubuntu-com%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. 8.8.8.8 (provided by Google) is the easiest to remember.
Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server.
If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use 8.8.8.8 as your primary DNS forever.
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
The address(es) in your/etc/resolv.confare your DNS resolvers. They have little to no relation to the IP address of your server.
– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
add a comment |
The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. 8.8.8.8 (provided by Google) is the easiest to remember.
Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server.
If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use 8.8.8.8 as your primary DNS forever.
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
The address(es) in your/etc/resolv.confare your DNS resolvers. They have little to no relation to the IP address of your server.
– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
add a comment |
The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. 8.8.8.8 (provided by Google) is the easiest to remember.
Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server.
If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use 8.8.8.8 as your primary DNS forever.
The problem is that the DNS server you had originally isn't responding to your queries. You can add another one to the list to check. 8.8.8.8 (provided by Google) is the easiest to remember.
Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server.
If the original server is one that the VPS provider gave you, you may want to bring this up with their support team - it's possible there's some sort of management tool that depends on it. Other than that, you can use 8.8.8.8 as your primary DNS forever.
answered May 8 '12 at 2:49
NathanGNathanG
1,206914
1,206914
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
The address(es) in your/etc/resolv.confare your DNS resolvers. They have little to no relation to the IP address of your server.
– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
add a comment |
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
The address(es) in your/etc/resolv.confare your DNS resolvers. They have little to no relation to the IP address of your server.
– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
I don't know much about this but the IP address of my VPS is different from the one in resolv.conf, is this a problem as well?
– dukevin
May 8 '12 at 2:52
2
2
The address(es) in your
/etc/resolv.conf are your DNS resolvers. They have little to no relation to the IP address of your server.– EEAA
May 8 '12 at 2:53
The address(es) in your
/etc/resolv.conf are your DNS resolvers. They have little to no relation to the IP address of your server.– EEAA
May 8 '12 at 2:53
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
> Add the line nameserver 8.8.8.8 to your /etc/resolv.conf to query that server. sudoedit /etc/resolv.conf Thank you!!! This worked perfectly.
– user138034
Sep 22 '12 at 16:50
add a comment |
In Ubuntu 18.04 /etc/resolv.conf file managed by systemd-resolved and must not be edited. You must add right nameserver (8.8.8.8) to /etc/netplan/*.yaml here:
nameservers:
addresses: [..., 8.8.8.8]
Manually, or by this oneliner, if string addresses: is only one in the file)
sed -r 's/(addresses: [.*)]/1, 8.8.8.8]/g' /etc/netplan/01-netcfg.yaml |
sudo tee /etc/netplan/01-netcfg.yaml &&
sudo netplan apply
(This is ubuntu server and one file 01-netcfg.yaml)
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
add a comment |
In Ubuntu 18.04 /etc/resolv.conf file managed by systemd-resolved and must not be edited. You must add right nameserver (8.8.8.8) to /etc/netplan/*.yaml here:
nameservers:
addresses: [..., 8.8.8.8]
Manually, or by this oneliner, if string addresses: is only one in the file)
sed -r 's/(addresses: [.*)]/1, 8.8.8.8]/g' /etc/netplan/01-netcfg.yaml |
sudo tee /etc/netplan/01-netcfg.yaml &&
sudo netplan apply
(This is ubuntu server and one file 01-netcfg.yaml)
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
add a comment |
In Ubuntu 18.04 /etc/resolv.conf file managed by systemd-resolved and must not be edited. You must add right nameserver (8.8.8.8) to /etc/netplan/*.yaml here:
nameservers:
addresses: [..., 8.8.8.8]
Manually, or by this oneliner, if string addresses: is only one in the file)
sed -r 's/(addresses: [.*)]/1, 8.8.8.8]/g' /etc/netplan/01-netcfg.yaml |
sudo tee /etc/netplan/01-netcfg.yaml &&
sudo netplan apply
(This is ubuntu server and one file 01-netcfg.yaml)
In Ubuntu 18.04 /etc/resolv.conf file managed by systemd-resolved and must not be edited. You must add right nameserver (8.8.8.8) to /etc/netplan/*.yaml here:
nameservers:
addresses: [..., 8.8.8.8]
Manually, or by this oneliner, if string addresses: is only one in the file)
sed -r 's/(addresses: [.*)]/1, 8.8.8.8]/g' /etc/netplan/01-netcfg.yaml |
sudo tee /etc/netplan/01-netcfg.yaml &&
sudo netplan apply
(This is ubuntu server and one file 01-netcfg.yaml)
edited Apr 4 at 12:14
answered Feb 28 at 12:35
Ramil YabbarovRamil Yabbarov
11
11
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
add a comment |
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
1
1
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
be careful with such replace actions, it could replace more IP addresses in the file than you want, rendering your system useless. If you explained why it is better to configure the DNS server in the netplan config file in newer versions of Ubuntu this could be come a good answer.
– Gerald Schneider
Feb 28 at 12:49
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f386918%2fapt-get-cannot-connect-failure-resolving-archive-ubuntu-com%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This is a DNS problem. What's in your /etc/resolv.conf?
– NathanG
May 8 '12 at 2:26
@NathanG updated my question
– dukevin
May 8 '12 at 2:29
Try adding a line in resolv.conf with
nameserver 8.8.8.8.– NathanG
May 8 '12 at 2:37
I did get these messages when running
apt-get upgradecryptsetup: WARNING: failed to detect canonical device of /dev/xvda1cryptsetup: WARNING: could not determine root device from /etc/fstabbut otherwise it seems to work good– dukevin
May 8 '12 at 2:41