インターネットに接続しているのに閲覧できない

インターネットに接続しているのに閲覧できない

zati@zati-K42JZ:~$ sudo apt-get update [sudo] password for zati: Err http://archive.ubuntu.com precise Release.gpg
Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) Err http://security.ubuntu.com precise-security Release.gpg
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname) Err http://archive.canonical.com precise Release.gpg
Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname) Err http://extras.ubuntu.com precise Release.gpg
Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname) Err http://archive.ubuntu.com precise-updates Release.gpg
Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://security.ubuntu.com precise-security Release
Ign http://archive.canonical.com precise Release
Ign http://extras.ubuntu.com precise Release
Err http://archive.ubuntu.com precise-backports Release.gpg
Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://archive.canonical.com precise/partner i386 Packages/DiffIndex
Ign http://extras.ubuntu.com precise/main i386 Packages/DiffIndex
Ign http://archive.ubuntu.com precise Release
Ign http://security.ubuntu.com precise-security/restricted i386 Packages/DiffIndex Ign http://archive.canonical.com precise/partner TranslationIndex
Ign http://extras.ubuntu.com precise/main TranslationIndex
Ign http://archive.ubuntu.com precise-updates Release
Ign http://security.ubuntu.com precise-security/universe i386 Packages/DiffIndex Ign http://security.ubuntu.com precise-security/multiverse i386 Packages/DiffIndex Ign http://archive.ubuntu.com precise-backports Release
Ign http://archive.ubuntu.com precise/main i386 Packages/DiffIndex
Ign http://security.ubuntu.com precise-security/main TranslationIndex
Ign http://archive.ubuntu.com precise/restricted i386 Packages/DiffIndex
Ign http://security.ubuntu.com precise-security/multiverse TranslationIndex
Ign http://security.ubuntu.com precise-security/restricted TranslationIndex
Ign http://security.ubuntu.com precise-security/universe TranslationIndex
Ign http://archive.ubuntu.com precise/main TranslationIndex
Ign http://archive.ubuntu.com precise/multiverse TranslationIndex
Ign http://archive.ubuntu.com precise/restricted TranslationIndex
Ign http://archive.ubuntu.com precise/universe TranslationIndex
Err http://archive.canonical.com precise/partner i386 Packages
Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname) Err http://extras.ubuntu.com precise/main i386 Packages
Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname) Err http://archive.canonical.com precise/partner Translation-en_US
Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname) Err http://extras.ubuntu.com precise/main Translation-en_US
Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://archive.ubuntu.com precise-updates/main TranslationIndex
Err http://archive.canonical.com precise/partner Translation-en
Something wicked happened resolving 'archive.canonical.com:http' (-5 - No address associated with hostname) Err http://extras.ubuntu.com precise/main Translation-en
Something wicked happened resolving 'extras.ubuntu.com:http' (-5 - No address associated with hostname) Ign http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
Ign http://archive.ubuntu.com precise-updates/restricted TranslationIndex Ign http://archive.ubuntu.com precise-updates/universe TranslationIndex
20% [Connecting to archive.ubuntu.com] [Connecting to security.ubuntu.com]
昨日、12.04 Ubuntuに管理システムをインストールしようとしました。sudo gedit /etc/apt/sources.listを使用してsources.listのリポジトリを編集しようとしました。正しく入力したかどうかわかりません。debとしか入力していません。http://dms.oscc.org.my/repoウェブサイトに記載されているように、binary/ です。apt-get update を実行しようとすると、-5 エラーが実行されます。なぜこのようなことが起こるのでしょうか? アーカイブとセキュリティでも -5 エラーが実行されます。

そして、解決策を見つけようとしましたが、そうしている間に(他の人が投稿したいくつかの解決策に従いました)、sources.list には 2 行しか残りませんでした。つまり、破損しているということですか?

次に、インターネットにアクセスしようとしましたが、サーバーが見つからないというメッセージが表示されます。google.com に ping を実行しようとすると、不明なホストというメッセージが表示されます。ルーターに ping を実行することはできますが、それ以外は失敗します。

私はUbuntuの使用に関しては本当に初心者なので、皆さんが私を助けてくれることを願っています。現在インターンシップ中なので、とても助かります。よろしくお願いします。

答え1

そうですね、おそらくいくつかの場所でファイルを変更したことを考えると、適切なアドバイスを得るのは少し難しいです。少なくとも、私はあなたの質問をそのように読みました。

第一歩 これまでの手順を遡って、実行した操作をすべて元に戻します。

sources.list特定の構文があり、任意の URL を追加できるわけではないと思います。これ今後の参考のために、リンクを追加する方法についての良いガイドのようですsources.list。編集の最初のステップsources.listは、現在のものをバックアップする

ステップ2

私はあなたのディレクトリ(あなたのホームディレクトリ)にあるすべてのデータを保存し/home/$USER、Ubuntuを再インストールします(最新の安定版リリースをインストールすることもできます)Ubuntu 14.04.2 LTSUbuntuのインストールには30分もかかりません。これは私にとって、複数の場所にある壊れたファイルをすべて修復する最も簡単な方法です(最も洗練された解決策ではありません)

tar -zcvf backup.tar.gz /home/$USER最も簡単な方法です。これにより、ホームディレクトリにあるすべてのものを 1 つのファイルにまとめることができます (このようなファイルの作成には時間がかかる場合があります)

ステップ3

解決策はここにあります-5 - No address associated with hostname

その答えからすると、修正するにはファイルを-5 - No address associated with hostnameクリーンアップするだけでよいようです/etc/hosts

/etc/hostsUbuntu 14.04でのファイルの様子です

``` 127.0.0.1 ローカルホスト
127.0.1.1 コンピュータ名

# IPv6 対応ホストの場合は次の行が望ましいです
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouter ```

関連情報