0

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]
yesterday i tried to install a management system into my 12.04 ubuntu. I tried to edit the repository in sources.list using sudo gedit /etc/apt/sources.list . I am not sure whether i type it correctly, i only type the deb http://dms.oscc.org.my/repo binary/ as told in the website. when i want to apt-get update, it execute a -5 error. why is that happening? it execute -5 error for archive and security too.

and then i tried to figure out solutions but while doing that(i follow some solutions posted by other people), then my sources.list only left with two lines. so it is corrupted right?

next, i tried to access the internet, but it says it cant found servers. when i tried to ping google.com, it says unknown host. i can ping my router successfully but other than that, it fails.

i am really a newbie in using ubuntu, and i hope you guys can help me, and that'll means a lot since i am currently doing my internship. thankyou in advance

  • Firstly I don't think you are not asking the right question. Secondly can post error you are getting.. Start from the start what error are you getting when you run sudo apt-get update p.s mark your code as code. cheers – Serine Jul 01 '15 at 04:02
  • @serine I'm sorry, I tried to post my code but it says its too long – zaty feena Jul 03 '15 at 01:28
  • I can't see anything.. – Serine Jul 03 '15 at 01:29
  • Welp, my mistake. I have edit my question altogether with the code. Thankyou for your effort to help me @serine. Your help is very much appreciated. – zaty feena Jul 03 '15 at 01:39

1 Answers1

0

Okay it is some what tricky to get you the right advice given that you've probably modified files in few places. At least that's how I read your question.

step one Trace you steps back and undo everything you did.

sources.list has certain syntax to it and I don't think you can append just any URL to it. This looks like a good guide for future reference, on how to add links to you sources.list. Please note that step one in editing you sources.list is to back the current one up.

step two

I would just save all the data in your /home/$USER directory (that is your home directory) and reinstall ubuntu (might as well install the latest stable release Ubuntu 14.04.2 LTS. Ubuntu installation takes less 30 minutes). This to me the easiest way to fix all broken files in several places (not the most sophisticated solution)

tar -zcvf backup.tar.gz /home/$USER is the easiest way. This will make single file with all of you stuff in home directory (might take a while to make such file)

step three

Here is a solution to -5 - No address associated with hostname

It looks like from that answer that all you need to do to fix -5 - No address associated with hostname is clean up you /etc/hosts file

this is how my /etc/hosts file looks in Ubuntu 14.04

``` 127.0.0.1 localhost
127.0.1.1 your computer name

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouter ```

Serine
  • 163