Announcement

Collapse
No announcement yet.

[solved - I hope] How do I fix messed up apt-get?

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

    [solved - I hope] How do I fix messed up apt-get?

    I tried to install a package, and it pulled an error message and refused to install:
    Code:
    greenman@Wolfenstein:~/Downloads$ sudo dpkg -i iscan_2.19.0-4_amd64.deb
    [sudo] password for greenman:
    (Reading database ... 358837 files and directories currently installed.)
    Unpacking iscan (from iscan_2.19.0-4_amd64.deb) ...
    /var/lib/dpkg/tmp.ci/preinst: 29: Bad substitution
    dpkg: error processing iscan_2.19.0-4_amd64.deb (--install):
     subprocess pre-installation script returned error exit status 2
    Processing triggers for menu ...
    Errors were encountered while processing:
     iscan_2.19.0-4_amd64.deb
    Need this to run my scanner; figures it wouldn't work.
    So I attempted to remove it:
    Code:
    greenman@Wolfenstein:~/Downloads$ sudo dpkg --remove iscan-interpreter
    dpkg - warning: ignoring request to remove iscan-interpreter which isn't installed.
    And just to make sure, did an apt-get clean.
    Then, when I try to update:
    Code:
    greenman@Wolfenstein:~$ sudo apt-get update
    [archive lists snipped]
    Fetched 6259kB in 35s (174kB/s)
    Reading package lists... Done
    W: Ignoring Provides line with DepCompareOp for package iscan-interpreter
    W: You may want to run apt-get update to correct these problems
    I can't get rid of the miserable thing. Tried purging, cleaning, and it still doesn't go away.
    Any idea what has happened, and how to clean it out?

    Addendum:
    Code:
    greenman@Wolfenstein:~$ dpkg-query --show iscan*
    iscan
    iscan-interpreter
    iscan-plugin-cx4400
    iscan-plugin-gt-7200
    iscan-plugin-gt-7300
    iscan-plugin-gt-9400
    iscan-plugin-gt-f500
    iscan-plugin-gt-f520
    iscan-plugin-gt-f600
    iscan-plugin-gt-f670
    iscan-plugin-gt-f700
    iscan-plugin-gt-s600
    iscan-plugin-gt-x750
    It's still there, and trying to purge or remove doesn't flush it.
    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    #2
    Re: How do I fix messed up apt-get?

    Have you tried by any chance "apt-get install -f"?

    Comment


      #3
      Re: How do I fix messed up apt-get?

      The way you ran dpkg-query it is not telling you if those packages are installed or if they have been installed and then removed but not purged. You probably do not have a problem at all anymore. If you do sudo aptitude -f install
      will probably fix it.

      If you run dpkg -l | grep iscan
      it will show you the state of the package. You will probably see many rc for removed but config files still on the system.
      If you want to purge them try
      sudo aptitude purge packagename
      or
      sudo dpkg --purge packagename

      Comment


        #4
        Re: How do I fix messed up apt-get?

        Thanks for the suggestions. I tried all of those. Example:
        Code:
        greenman@Wolfenstein:~$ sudo aptitude purge iscan_2.19.0-4_amd64.deb
        Reading package lists... Done                    
        Building dependency tree
        Reading state information... Done
        Reading extended state information
        Initializing package states... Done
        Couldn't find any package whose name or description matched "iscan_2.19.0-4_amd64.deb"
        Couldn't find any package whose name or description matched "iscan_2.19.0-4_amd64.deb"
        And:
        Code:
        greenman@Wolfenstein:~$ sudo dpkg --purge iscan*
        [sudo] password for greenman:          
        dpkg - warning: ignoring request to remove iscan* which isn't installed.
        But it's still there:
        Code:
        greenman@Wolfenstein:~$ sudo apt-get update                 
        Get:1 [url]http://us.archive.ubuntu.com[/url] jaunty Release.gpg [189B]          
        Ign [url]http://us.archive.ubuntu.com[/url] jaunty/main Translation-en_US         
        Hit [url]http://download.virtualbox.org[/url] intrepid/non-free Packages          
        [etc. etc.]
        Hit [url]http://us.archive.ubuntu.com[/url] jaunty-proposed/main Packages
        Hit [url]http://us.archive.ubuntu.com[/url] jaunty-proposed/multiverse Packages
        Hit [url]http://us.archive.ubuntu.com[/url] jaunty-proposed/universe Packages
        Fetched 6260kB in 35s (175kB/s)
        Reading package lists... Done
        W: Ignoring Provides line with DepCompareOp for package iscan-interpreter
        W: You may want to run apt-get update to correct these problems
        Well, it's buried itself in there somewhere.
        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: How do I fix messed up apt-get?

          You can try
          Code:
          sudo apt-get autoremove
          that is pretty good at stripping out stuff that isn't actually installed or a dependency on something that is installed.

          Comment


            #6
            Re: How do I fix messed up apt-get?

            Just tried that. No luck. Error message is still there.
            Any ideas where the "W:" part is coming from?
            If dpkg-configure can find it, it's still in a database somewhere. This is a package I downloaded, and is not in any repository. I seem to recall during a backup seeing a whole list of stuff dpkg keeps of what it has seen, but I sure can't find it now that I need to.
            We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

            Comment


              #7
              Re: How do I fix messed up apt-get?

              This:

              W: You may want to run apt-get update to correct these problems
              is a somewhat generic message that is put up when any of a number of conditions is encountered. It's quite unhelpful.

              I forget -- if haven't already run
              Code:
              sudo dpkg --configure -a
              you need to do that. If no errors are generated, then that would indicate that your package database itself is fine.

              Then I would check your sources and see if there is a non-standard repository (not a ubuntu or medibuntu repo). Try commenting it out of the sources.list file, and then run the apt-get update command again. This is on the chance that the error may be coming from a repo rather than from your system.

              Comment


                #8
                Re: How do I fix messed up apt-get?

                OK, tried that. No errors from dpkg --configure -a.
                Removed all non-ubuntu repositories. Error still there on update.

                Here's a bit of a dilemma:

                Code:
                greenman@Wolfenstein:~$ dpkg-query -l iscan*      
                Desired=Unknown/Install/Remove/Purge/Hold       
                | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
                |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
                ||/ Name     Version    Description                 
                +++-==============-==============-============================================ 
                in iscan     <none>    (no description available)
                un iscan-interpre <none>    (no description available)
                un iscan-plugin-c <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                un iscan-plugin-g <none>    (no description available)
                greenman@Wolfenstein:~$ sudo dpkg --purge iscan
                dpkg - warning: ignoring request to remove iscan which isn't installed.
                Seems dpkg-query thinks it it installed, but purge can't find it to remove, if I'm reading this right.
                Maybe this is much ado about nothing, but if the package database is corrupt in some way, it may come back to haunt later.
                FYI: Synaptic is pulling the same error on startup:
                W: Ignoring Provides line with DepCompareOp for package iscan-interpreter

                I've just got a bad feeling about this...
                We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                Comment


                  #9
                  Re: How do I fix messed up apt-get?

                  That's an odd one. I've always understood that if the dpkg --configure -a command results in a happy dpkg system, then you can breathe easy.

                  I think maybe there is a bit of iscan that was installed, but not all of it. I don't know if you can use a "-f" switch on "--purge" or not. You might be better off waiting to see whether future problems arise -- sometimes chasing non-problems can actually induce new problems.

                  Comment


                    #10
                    Re: How do I fix messed up apt-get?

                    I think I found it.

                    It's buried in the file:
                    /var/lib/dpkg/status

                    It might be courting disaster to mess with it, but I removed the entries for the two packages that I tried to install. Seems to have fixed the problem; dpkg-query now knows nothing about them, and the error messages from update are gone.
                    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                    Comment


                      #11
                      Re: How do I fix messed up apt-get?

                      Originally posted by doctordruidphd

                      It's buried in the file:
                      /var/lib/dpkg/status
                      Aha! Great catch, Dr. D!

                      Comment

                      Working...
                      X