Announcement

Collapse
No announcement yet.

apt-get update fails

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    apt-get update fails

    Just tried an apt-get update as follows and get the message below. I am a new Kubuntu user. What do I do to fix this? Thanks for any help.

    Code:
     sudo apt-get update
    E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list

    #2
    Re: apt-get update fails

    The source list is messed up. Did you use Automatix?

    Do Alt-F2 "kdesu kate /etc/apt/sources.list" with no quote marks to open it for editing.

    Maybe it is ONLY the first line that is messed up, or maybe there are multiple messed up lines -- I can't tell. But, if you observe the well-organized and formatted nature of that particular file, it should be fairly obvious where the damaged part ends and the clean part begins. You need to delete the damaged lines, which are apparently at the beginning. When you think it's fixed, click "File>save" to save it.

    I happen to be on a relative's Gutsy system at the moment, so I will post a clean Gutsy source list, for your reference:
    Code:
    # 
    
    # See [url]http://help.ubuntu.com/community/UpgradeNotes[/url] for how to upgrade to
    # newer versions of the distribution.
    
    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy main restricted
    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates main restricted
    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy universe
    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    ## team, and may not be under a free licence. Please satisfy yourself as to 
    ## your rights to use the software. Also, please note that software in 
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy multiverse
    deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy multiverse
    
    ## Uncomment the following two lines to add software from the 'backports'
    ## repository.
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] feisty-backports main restricted universe multiverse
    # deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] feisty-backports main restricted universe multiverse
    
    deb [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security main restricted
    deb-src [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security main restricted
    deb [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security universe
    deb-src [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security universe
    deb [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security multiverse
    deb-src [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security multiverse
    Medibuntu has pretty clear instructions for adding their repo to your sources list -- follow the instructions on the "How To Add Repos" tab on their site and you should be OK.

    Comment


      #3
      Re: apt-get update fails

      I did use Automatix. Was that bad?

      Comment


        #4
        Re: apt-get update fails

        The Linux guys I know have said NOT to use Automatix.
        It messes things up, especially on any updates/changes.
        Bad experiences reported.
        I've seen it even mess up the GRUB boot menu upon getting kernel updates.
        Can cause quite a mess with your setup.
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: apt-get update fails

          My sources.list but apt-get seems to trying to read the medibutu.list. I think I messed up using Automatix

          Code:
          ## Uncomment the following two lines to fetch updated software from the network
          deb [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy main restricted 
          deb-src [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy main restricted 
          
          ## Uncomment the following two lines to fetch major bug fix updates produced
          ## after the final release of the distribution.
          deb [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy-updates main restricted 
          deb-src [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy-updates main restricted 
          
          ## Uncomment the following two lines to add software from the 'universe'
          ## repository.
          ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
          ## team, and may not be under a free licence. Please satisfy yourself as to
          ## your rights to use the software. Also, please note that software in
          ## universe WILL NOT receive any review or updates from the Ubuntu security
          ## team.
          deb [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy universe 
          deb-src [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy universe 
          
          deb [url]http://security.ubuntu.com/ubuntu/[/url] gutsy-security main restricted 
          deb-src [url]http://security.ubuntu.com/ubuntu/[/url] gutsy-security main restricted 
          
          deb [url]http://security.ubuntu.com/ubuntu/[/url] gutsy-security universe 
          deb-src [url]http://security.ubuntu.com/ubuntu/[/url] gutsy-security universe 
          
          deb [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy multiverse 
          deb-src [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy multiverse 
          
          deb [url]http://archive.ubuntu.com/ubuntu/[/url] gutsy-backports main restricted universe multiverse 
          
          deb [url]http://archive.canonical.com/ubuntu/[/url] gutsy partner 
          
          deb [url]http://packages.medibuntu.org/[/url] gutsy free non-free 
          
          deb [url]http://apt.wicd.net[/url] debian extras
          
          #AUTOMATIX REPOS START
          
          deb [url]http://www.getautomatix.com/apt[/url] gutsy main
          
          deb [url]http://archive.ubuntu.com/ubuntu[/url] gutsy-updates universe multiverse
          
          deb [url]http://security.ubuntu.com/ubuntu[/url] gutsy-security multiverse
          #AUTOMATIX REPOS END

          Comment


            #6
            Re: apt-get update fails

            Originally posted by Qqmike
            The Linux guys I know have said NOT to use Automatix.
            It messes things up, especially on any updates/changes.
            Bad experiences reported.
            I've seen it even mess up the GRUB boot menu upon getting kernel updates.
            Can cause quite a mess with your setup.
            Oh my gosh. I hope I can fix this. I also used Automatix on my laptop but it seems to be doing ok with apt-get. The hazards of being a newbie with more guts than knowledge.

            Comment


              #7
              Re: apt-get update fails

              Yep, you can color yourself Victim #27439 of Automatix LOL

              Were I you, I would save my existing sources.list as ".bak" and copy the one I posted and save it as "sources.list" in your /etc/apt/ directory. You'll need to have kate open in Super User mode to save it there, so Alt-F2 "kdesu kate" with no quote marks, copy the list with your browser, then do a paste into a new document in kate, and save it as "sources.list" in that directory, then in a console to
              Code:
              dpkg --configure -a
              and you should be good to go.

              If you need that wicd source repo, you'll have to add it back in after you fix the list.

              Comment


                #8
                Re: apt-get update fails

                Thanks very much. A couple of newbie questions.

                1. What is a repo?

                2. Is the sources.list file sending the updater to the medibuntu.list?

                Comment


                  #9
                  Re: apt-get update fails

                  Originally posted by dibl
                  Yep, you can color yourself Victim #27439 of Automatix LOL

                  Were I you, I would save my existing sources.list as ".bak" and copy the one I posted and save it as "sources.list" in your /etc/apt/ directory. You'll need to have kate open in Super User mode to save it there, so Alt-F2 "kdesu kate" with no quote marks, copy the list with your browser, then do a paste into a new document in kate, and save it as "sources.list" in that directory, then in a console to
                  Code:
                  dpkg --configure -a
                  and you should be good to go.

                  If you need that wicd source repo, you'll have to add it back in after you fix the list.
                  Ok, created the new sources.list but apt-get is still trying to use source list /etc/apt/sources.list.d/medibuntu.list

                  Gosh. I hope i haven't really messed up my nice desktop setup. I should have stopped while I was ahead.

                  Comment


                    #10
                    Re: apt-get update fails

                    1. "repo" = repository. The repository system, in combination with the user's /etc/apt/sources.list, is a means of controlling the release and distribution of *buntu system files and packages. The idea is, the developers organize files according to the version and architecture that they work with, and then let the sources list keep that straight on the user's system. So the "repos" are where your updated files and packages come from, through mirror servers closer to where you live than where Canonical (and the repos) actually are.

                    2. Medibuntu is a non-Canonical repository for software that is not "open source" software -- you may or may not be legally entitled to run it if you didn't accept a license from its author. So, you can add the Medibuntu repository for your Gutsy system by going to the medibuntu site here and following the instruction on the "Repo How To" tab. It won't hurt anything -- just open the Konsole and do as it says to add the source and the gpg key for 7.10.

                    Don't feel bad -- I had to screw up a sources list once with Automatix, in order to learn the better way.

                    Comment


                      #11
                      Re: apt-get update fails

                      Originally posted by rbrown3rd

                      Ok, created the new sources.list but apt-get is still trying to use source list /etc/apt/sources.list.d/medibuntu.list
                      That's odd -- on this Gutsy system the folder /etc/apt/sources.list.d/ is completely empty.

                      I'd say use Konqueror in Super User mode (Alt-F2 "kdesu konqueror"), and delete that medibuntu.list and anything else that is in that folder. It's obviously not essential.

                      Comment


                        #12
                        Re: apt-get update fails

                        When you add Third-party repositories, they are created as separate '.list' files. This is the purpose of the /etc/apt/sources.list.d directory - to hold these 'other repository lists.' As long as the directory has any .list files in it, apt is going to attempt to use them. If you are still getting E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list then you need to 'fix' the medibuntu.list line 1 entry. If you will post this file, we can quickly tell you what needs to be changed.
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: apt-get update fails

                          Ok, I deleted everything in that folder. Then I did a sudo dpkg --configure -a followed by a sudo apt-get update and everything seems to be ok now. Boy, amateurs can be dangerous can't they?

                          Comment


                            #14
                            Re: apt-get update fails

                            Yes, we can!

                            Comment


                              #15
                              Re: apt-get update fails

                              You are very kind and diplomatic. Thanks for all your help. I have a million other questions but will start other threads for those as I wade through the learning curve. I really love Kubuntu and use most of the time now. I still have some uses for WinXP so I have to keep a couple of my machines running that but my laptop is now pure Kubuntu and very sweet. I have my desktop configured nicely with Ksmoothdock and it humming. Sorry to digress and thanks again for all your help.

                              Bob

                              Comment

                              Working...
                              X