Announcement

Collapse
No announcement yet.

Reading package lists... Error! (NOT solved)

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

    Reading package lists... Error! (NOT solved)

    A while back Kubuntu kept telling me that my filesystem was read-only, and I often had to run fsck before turning on my computer. I found out, from using smartctl, that my hard drive was on the verge of death, so I backed up all my data and installed a new (well, actually old - different, I guess) drive and reinstalled. smartctl told me that this drive was just fine, and actually very nearly brand new.

    It's been running fine for about a month, now, but just the other day it started showing the same symptoms as the last one did, so, after running fsck, I decided to install smartmontools (the package that smartctl is contained in). I'm doing this from within a Konsole window in KDE, so my filesystem is working all right (X won't start when it's read-only). But I get this error when I try to install:

    Code:
    mark@kellerboys:~$ sudo apt-get install smartmontools
    Reading package lists... Error!
    E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages (1)
    E: The package lists or status file could not be parsed or opened.
    Anyone know what's wrong? I seriously need to be able to use apt, and there's obviously something still wrong, but I'm not sure how to fix it. What should I do?

    #2
    Re: Reading package lists... Error!

    Open a console and type:
    Code:
    cat /etc/apt/sources.list
    copy and paste for a review.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Reading package lists... Error!

      Thanks, Snowhog. Here it is:

      Code:
      mark@kellerboys:~$ cat /etc/apt/sources.list
      deb cdrom:[Kubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016.1)]/ gutsy main restricted
      # 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
      deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates universe
      deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates 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
      deb [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates multiverse
      deb-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-updates 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-src [url]http://us.archive.ubuntu.com/ubuntu/[/url] gutsy-backports main restricted universe multiverse
      
      ## Uncomment the following two lines to add software from Canonical's
      ## 'partner' repository. This software is not part of Ubuntu, but is
      ## offered by Canonical and the respective vendors as a service to Ubuntu
      ## users.
      # deb [url]http://archive.canonical.com/ubuntu[/url] gutsy partner
      # deb-src [url]http://archive.canonical.com/ubuntu[/url] gutsy partner
      
      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

      Comment


        #4
        Re: Reading package lists... Error!

        AHH!! The (most likely) culprit is right at the top of the listing:
        deb cdrom:[Kubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016.1)]/ gutsy main restricted
        Open Adept Manager, click on Adept | Manage Repositories and go to the Third-Party Software tab. Delete the cdrom entry.

        Try reinstalling the package.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Reading package lists... Error!

          I took that out, but it still doesn't work (and gives the same error). Any other ideas?

          And reinstall what package? Apt?


          EDIT: Oh, and Merry Christmas!

          Comment


            #6
            Re: Reading package lists... Error!

            Open a console window, and try these, one at a time:
            Code:
            sudo dpkg --configure -a
            Code:
            sudo apt-get autoclean
            Code:
            sudo apt-get update
            Code:
            sudo apt-get install
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Reading package lists... Error!

              It didn't appear to help any. The first command seemed to run fine, but the last three (with apt-get) all failed. Output:

              Code:
              mark@kellerboys:~$ sudo dpkg --configure -a
              [sudo] password for mark:
              mark@kellerboys:~$ sudo apt-get autoclean
              Reading package lists... Error!
              E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages (1)
              E: The package lists or status file could not be parsed or opened.
              mark@kellerboys:~$ sudo apt-get update
              Get:1 [url]http://us.archive.ubuntu.com[/url] gutsy Release.gpg [191B]
              Get:2 [url]http://security.ubuntu.com[/url] gutsy-security Release.gpg [191B]
              Hit [url]http://security.ubuntu.com[/url] gutsy-security Release
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/main Packages
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/restricted Packages
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/main Sources
              Get:3 [url]http://us.archive.ubuntu.com[/url] gutsy-updates Release.gpg [191B]
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/restricted Sources
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/universe Packages
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/universe Sources
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/multiverse Packages
              Hit [url]http://security.ubuntu.com[/url] gutsy-security/multiverse Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy Release
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates Release
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/main Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/restricted Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/main Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/restricted Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/universe Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/universe Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/multiverse Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy/multiverse Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/main Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/restricted Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/main Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/restricted Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/universe Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/universe Sources
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/multiverse Packages
              Hit [url]http://us.archive.ubuntu.com[/url] gutsy-updates/multiverse Sources
              Fetched 3B in 4s (1B/s)
              Reading package lists... Error!
              E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages (1)
              E: The package lists or status file could not be parsed or opened.
              mark@kellerboys:~$ sudo apt-get install
              Reading package lists... Error!
              E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages (1)
              E: The package lists or status file could not be parsed or opened.
              mark@kellerboys:~$
              And I think there's more problems lurking besides this one with apt-get, because at first, when I tried to run the commands, Konsole crashed on startup, as did Kate, and when I tried logging in under a different text-only virtual desktop, it said that bash had 1 error since the last startup, and it failed to open. Rebooting fixed that, though - temporarily at least.

              But it appears that dpkg is still working, even though apt isn't. Would you recommend my downloading apt (or whatever package manages the database) from the Ubuntu website and installing it manually? Or would that automatically uninstall everything else, since it'd probably overwrite my package list?

              Comment


                #8
                Re: Reading package lists... Error!

                Hmm. Okay, it looks like /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages (1) is causing all the problems.

                Open a console and type:
                Code:
                cd /var/lib/apt/lists
                Code:
                ls -l us.archive.ubuntu.com*
                Copy and paste the results for review.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: Reading package lists... Error!

                  Before we can further address this problem, I think we've got to fix another one first. After using it for just a bit this evening (after coming home from my grandparents', where we'd gone for the holiday), the computer completely locked up (which seems to happen from time to time). I reset it, and the operating system loaded part of the way, and then switched from the loading bar to text mode, and displayed what appeared to be a bunch of errors with /dev/hdb, which is the drive I've got Kubuntu installed in.

                  I then reset it again, and it loaded all the way (or at least the bar went all the way across), and then switched to text, showing that kdb and cups had been loaded . . . but there was no bash prompt, no X, and no KDE. After a few different tries, I've found that starting it normally will have it load all the way, and then either display those last two lines of startup output, or show nothing at all, and hang. But if I boot in recovery mode, it all comes up fine, and what's more, touch works perfectly, without saying that the medium is read-only, like it usually does if there's errors.

                  What should I do now? (Oh, and if any of you others reading this want to, go ahead and post your ideas so Snowhog needn't do all the work!)

                  Comment


                    #10
                    Re: Reading package lists... Error!

                    Okay, another quick bit of info:

                    I booted up a live CD, and installed smartctl and ran it on my hard drive. I've pasted the output here. As far as I can see, the drive seems to be in near-perfect condition, with the only problem at all being a Soft_Read_Error_Rate of 2. I also tried mounting my drive from the live CD too, to back up my important files, but it failed, with the following output:

                    Code:
                    ubuntu@ubuntu:~$ sudo /dev/hdb /home/ubuntu/Linux
                    sudo: /dev/hdb: command not found
                    ubuntu@ubuntu:~$ sudo mount /dev/hdb /home/ubuntu/Linux -t ext3
                    mount: wrong fs type, bad option, bad superblock on /dev/hdb,
                       missing codepage or other error
                       In some cases useful info is found in syslog - try
                       dmesg | tail or so
                    
                    ubuntu@ubuntu:~$ dmesg | tail
                    [ 131.560372] [drm] Setting GART location based on new memory map
                    [ 131.560388] [drm] Loading R300 Microcode
                    [ 131.560428] [drm] writeback test succeeded in 1 usecs
                    [ 135.309772] eth0: no IPv6 routers present
                    [ 380.456340] cramfs: wrong magic
                    [ 380.457206] VFS: Can't find ext3 filesystem on dev hdb.
                    [ 380.463461] Unable to identify CD-ROM format.
                    [ 380.464035] SQUASHFS error: Can't find a SQUASHFS superblock on hdb
                    [ 429.134570] VFS: Can't find ext3 filesystem on dev hdb.
                    [ 727.810471] VFS: Can't find ext3 filesystem on dev hdb.
                    ubuntu@ubuntu:~$
                    The last I booted in recovery mode, though, I was able to read my files fine, so perhaps there's still a chance of recovering my data. And there definitely is a serious problem of some sort, but it doesn't appear to be caused by faulty hardware . . .

                    By the way, do you think this is sufficiently removed from my apt-get errors to warrant starting a new thread (perhaps in the hardware board)? Or should I just continue my gripes here?

                    Comment


                      #11
                      Re: Reading package lists... Error!

                      To mount your HD from the LiveCD, you do the following:

                      Open a console and type:
                      Code:
                      cd /
                      sudo mkdir tmp/HDB
                      sudo mount /dev/hdb tmp/HDB
                      This, based on your statement that the HD is on /dev/hdb. Of course, you are not restricted in calling the directory HDB.

                      This will mount your HD from the LivCD and you can then access it.
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Re: Reading package lists... Error!

                        I actually already knew how to mount from the Live CD, but thanks for the help. I tried running the exact three commands you listed, though, anyway, and got this output:
                        Code:
                        ubuntu@ubuntu:~$ cd /
                        ubuntu@ubuntu:/$ sudo mkdir tmp/HDB
                        ubuntu@ubuntu:/$ sudo mount /dev/hdb tmp/HDB
                        mount: you must specify the filesystem type
                        Evidently because it didn't detect the ext3 filesystem, because it's corrupted. So I tried specifying, and got the same error as before:
                        Code:
                        ubuntu@ubuntu:/$ sudo mount /dev/hdb tmp/HDB -t ext3
                        mount: wrong fs type, bad option, bad superblock on /dev/hdb,
                           missing codepage or other error
                           In some cases useful info is found in syslog - try
                           dmesg | tail or so

                        Comment


                          #13
                          Re: Reading package lists... Error!

                          Try instead "sudo mount /dev/hdb1 /media/hdb1".
                          If it's a partition that you want to mount, you need to specify that.
                          For external use only.

                          Comment


                            #14
                            Re: Reading package lists... Error!

                            Whew, thanks! I was afraid it was all gone for good.

                            I guess what's next on the fix-it list is this startup problem. Is there some log file somewhere that I could post the contents of, so we could see what's making it hang?

                            Comment


                              #15
                              Re: Reading package lists... Error!

                              Hmm... I'd say the file it's mentioning has been corrupted in some way.
                              Try "sudo mv /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_gutsy-updates_multiverse_binary-i386_Packages.bak" and "sudo apt-get update".
                              For external use only.

                              Comment

                              Working...
                              X