VPS で apt-get コマンドを使用してソフトウェアをインストールできず、ターミナルに次のように表示されます。
root@ubuntu:~# apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3' has no installation candidate
何が問題なのでしょうか? root ユーザーとして apt-get update を試したところ、次のような結果が表示されました:
root@ubuntu:~# apt-get update
Err http://security.ubuntu.com precise-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://us.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-updates Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-backports Release.gpg
Temporary failure resolving 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@ubuntu:~#
私の VPS の場所はドイツにあります。これは問題になりますか?
答え1
DNS リゾルバ構成を修正する必要があります。たとえば、ホスト名を IP アドレスに変換するために独自のサーバーが使用している DNS サーバーなどです。これは、VPS で実行されている Web サイトには影響しません。ドメインが使用している DNS サーバーを変更しないでください。変更すると、Web サイトが壊れてしまいます。
プロバイダのDNSサーバーを使用することもできます(設定についてはプロバイダに問い合わせるか、ドキュメントを確認してください)。または、たとえばGoogle のパブリック DNS リゾルバ。
DNSサーバーを変更する方法については、例えば以下を参照してください。askubuntu.comのこの質問