Announcement

Collapse
No announcement yet.

Problem upgrading python-newt

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

    Problem upgrading python-newt

    Hello all!

    KPackageKit reported that I had some updates, so I hit install all. There was an error, so I tried apt-get. His is the result:
    Code:
    Preparing to replace python-newt 0.52.2-11.3ubuntu3 (using .../python-newt_0.52.2-11.3ubuntu3.1_amd64.deb) ...
    pycentral: pycentral pkgremove: package python-newt is not installed
    pycentral pkgremove: package python-newt is not installed
    dpkg: warning - old pre-removal script returned error exit status 1
    dpkg - trying script from the new package instead ...
    pycentral: pycentral pkgremove: package python-newt is not installed
    pycentral pkgremove: package python-newt is not installed
    dpkg: error processing /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb (--unpack):
     subprocess new pre-removal script returned error exit status 1
    pycentral: pycentral pkginstall: package python-newt is not installed
    pycentral pkginstall: package python-newt is not installed
    dpkg: error while cleaning up:
     subprocess post-installation script returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    I googled this error and came up empty.

    Thank's for your help!

    #2
    Re: Problem upgrading python-newt

    Hi

    I would start by doing

    Code:
    sudo apt-get update 
    sudo apt-get dist-upgrade
    And see the output, is that what you ran? It seems as if a post-removal script is failing. We may need to do some sort of minor surgery

    Comment


      #3
      Re: Problem upgrading python-newt

      Hello lmilano! Thank you for your reply.

      This is the output from apt-get dist-upgrade:
      Code:
      You might want to run `apt-get -f install' to correct these.
      The following packages have unmet dependencies:
       python-newt: Depends: libnewt0.52 (= 0.52.2-11.3ubuntu3) but 0.52.2-11.3ubuntu3.1 is installed
      E: Unmet dependencies. Try using -f.
      and this is the output from apt-get -f install:
      Code:
      Preparing to replace python-newt 0.52.2-11.3ubuntu3 (using .../python-newt_0.52.2-11.3ubuntu3.1_amd64.deb) ...
      pycentral: pycentral pkgremove: package python-newt is not installed
      pycentral pkgremove: package python-newt is not installed
      dpkg: warning - old pre-removal script returned error exit status 1
      dpkg - trying script from the new package instead ...
      pycentral: pycentral pkgremove: package python-newt is not installed
      pycentral pkgremove: package python-newt is not installed
      dpkg: error processing /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb (--unpack):
       subprocess new pre-removal script returned error exit status 1
      pycentral: pycentral pkginstall: package python-newt is not installed
      pycentral pkginstall: package python-newt is not installed
      dpkg: error while cleaning up:
       subprocess post-installation script returned error exit status 1
      Errors were encountered while processing:
       /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      What now?

      Comment


        #4
        Re: Problem upgrading python-newt

        Let's try this (I am looking at man:dpkg in konqueror

        Code:
        dpkg --remove-reinstreq -r python-newt
        Also: If you have synaptic installed, you can find broken packages and many times fix them from there very easily. If not, I would recommend installing it whenever we fix your system

        Comment


          #5
          Re: Problem upgrading python-newt

          As Jaunty is still still in alpha stage, and as is the case with any alpha stage OS, one can expect frequent breakage. But if one waits 24-hours and dist-upgrades again, most, if not all breakages get fixed. This 'wait and see' approach is safer than attempting to force a solution.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: Problem upgrading python-newt

            Originally posted by Snowhog
            As Jaunty is still still in alpha stage, and as is the case with any alpha stage OS, one can expect frequent breakage. But if one waits 24-hours and dist-upgrades again, most, if not all breakages get fixed. This 'wait and see' approach is safer than attempting to force a solution.
            Mmmmm. You mean Karmic? I think this is in Jaunty (9.04) really!

            Comment


              #7
              Re: Problem upgrading python-newt

              Dang!! Okay, still 'to early' here for me. My apologies. :P
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Re: Problem upgrading python-newt

                @lmilano
                Code:
                dpkg --remove-reinstreq -r python-newt
                resulted in:
                Code:
                dpkg: unknown option --remove-reinstreq

                Comment


                  #9
                  Re: Problem upgrading python-newt

                  A package is attempting to remove a package that you appear not to have installed - python-newt. One could attempt to 'satisfy' this poorly written packaging script by installing what it wants to remove. Open a console and type:
                  Code:
                  sudo apt-get install --simulate python-newt
                  If apt doesn't report anything out of the ordinary, then repeat without the --simulate option. When done, procede with the apt-get -f install.
                  Using Kubuntu Linux since March 23, 2007
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: Problem upgrading python-newt

                    Code:
                    sudo apt-get install --simulate python-newt
                    gives me:
                    Code:
                    Suggested packages:
                     python-newt-dbg
                    The following packages will be upgraded:
                     python-newt
                    1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
                    1 not fully installed or removed.
                    Inst python-newt [0.52.2-11.3ubuntu3] (0.52.2-11.3ubuntu3.1 Ubuntu:9.04/jaunty-updates)
                    Conf python-newt (0.52.2-11.3ubuntu3.1 Ubuntu:9.04/jaunty-updates)
                    After running
                    Code:
                    sudo apt-get install python-newt
                    I get the old error:
                    Code:
                    Preparing to replace python-newt 0.52.2-11.3ubuntu3 (using .../python-newt_0.52.2-11.3ubuntu3.1_amd64.deb) ...   
                    pycentral: pycentral pkgremove: package python-newt is not installed                        
                    pycentral pkgremove: package python-newt is not installed                              
                    dpkg: warning - old pre-removal script returned error exit status 1                         
                    dpkg - trying script from the new package instead ...                                
                    pycentral: pycentral pkgremove: package python-newt is not installed                        
                    pycentral pkgremove: package python-newt is not installed                              
                    dpkg: error processing /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb (--unpack):
                     subprocess new pre-removal script returned error exit status 1
                    pycentral: pycentral pkginstall: package python-newt is not installed
                    pycentral pkginstall: package python-newt is not installed
                    dpkg: error while cleaning up:
                     subprocess post-installation script returned error exit status 1
                    Errors were encountered while processing:
                     /var/cache/apt/archives/python-newt_0.52.2-11.3ubuntu3.1_amd64.deb
                    E: Sub-process /usr/bin/dpkg returned an error code (1)

                    Comment


                      #11
                      Re: Problem upgrading python-newt

                      Well, it was early here, too, how about (please see the manpage as I indicated above for more)

                      Code:
                      sudo dpkg -r --force-all python-newt
                      sudo apt-get install python-newt

                      Comment


                        #12
                        Re: Problem upgrading python-newt

                        So there is some vestige left over on your system that points to this package - python-newt - that it expects to find, but can't, because it isn't (or never was).

                        Try the following:
                        Code:
                        sudo apt-get install --reinstall python-newt
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: Problem upgrading python-newt

                          Originally posted by lmilano
                          Code:
                          sudo dpkg -r --force-all python-newt
                          sudo apt-get install python-newt
                          Don't know what man page of dpkg you have, but in mine there is no such option as --force-all. There is however, a --force-yes, but:
                          --force-yes
                          Force yes; This is a dangerous option that will cause apt to continue without prompting if it is doing
                          something potentially harmful. It should not be used except in very special situations. Using force-yes can
                          potentially destroy your system!
                          Configuration Item: APT::Get::force-yes.
                          Using Kubuntu Linux since March 23, 2007
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            Re: Problem upgrading python-newt

                            Originally posted by Snowhog
                            Originally posted by lmilano
                            Code:
                            sudo dpkg -r --force-all python-newt
                            sudo apt-get install python-newt
                            Don't know what man page of dpkg you have, but in mine there is no such option as --force-all.
                            Just the one in JKaunty 9.04 plus updates:
                            --force-things, --no-force-things, --refuse-things
                            Force or refuse (no-force and refuse mean the same thing) to do some things. things is a comma separated list of things specified below. --force-help displays a message describing them. Things marked with (*) are forced by default.
                            Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system.

                            all: Turns on (or off) all force options.
                            I did try these two commands on my system before posting, no issues whatsoever. But thanks for the heads up.

                            Comment


                              #15
                              Re: Problem upgrading python-newt

                              @Snowhog:
                              --reinstall didn't work. Same error.

                              @lmilano:
                              Code:
                              dpkg --remove --forceremove-reinstreq -r python-newt
                              Was the correct command (I didn't now what man:dpkg was). But it didn't work.

                              Code:
                              sudo dpkg -r --force-all python-newt
                              sudo apt-get install python-newt
                              Sadly this also didn't work.

                              IMaybe the answer is deleting/editing the failing script. This is python-newt.prerm:
                              Code:
                              case "$1" in remove|upgrade)
                              	pkgremove=y
                              esac
                              if [ -f /var/lib/pycentral/python-newt.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
                              	pkgremove=y
                              fi
                              if [ "$pkgremove" = y ]; then
                              if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
                              	pycentral pkgremove python-newt
                              else
                              	flist=$(tempfile)
                              	slist=$(tempfile)
                              	dpkg -L python-newt | tee $flist | \
                              	while read n; do
                              	 case "$n" in
                              	  /usr/share/pyshared/*)
                              	   n2=${n#/usr/share/pyshared/*}
                              	   case "$n" in
                              		*.py) echo "p $n";;
                              		*) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
                              	   esac
                              	   ;;
                              	  *) continue
                              	 esac
                              	done > $slist
                              	if [ -s $slist ]; then
                              	  for d in /usr/lib/python[0-9].[0-9]/????-packages; do
                              		case "$d" in */python2.1/*|*/python2.2/*) continue; esac
                              		while read t n; do
                              		  case "$t" in
                              			p) rm -f $d/$n $d/${n}[co];;
                              			d) rmdir $d/$n 2>/dev/null || true;;
                              			*) rm -f $d/$n
                              		  esac
                              		done < $slist
                              	  done
                              	fi
                                  awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
                              	  | xargs -r rm -f >&2
                              	rm -f $flist $slist
                              fi
                              rm -f /var/lib/pycentral/python-newt.pkgremove
                              fi

                              Comment

                              Working...
                              X