Announcement

Collapse
No announcement yet.

Unable to dpkg apps

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

    Unable to dpkg apps

    I uninstalled gnome as per the instructions on aysiu's psychocats site. All worked well, but it unistalled a couple of things that I want (firefox, amarok,thunderbird). I tried reinstalling these, as well as the kubuntu-desktop but have not had any luck. This is the message I am getting (this one on my last attempt to install firefox).

    garylowe@ubuntu:~$ sudo apt-get install firefox
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
    libatk1.0-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
    libpango1.0-0 libpango1.0-common
    Suggested packages:
    firefox-gnome-support latex-xft-fonts libthai0
    ttf-thryomanes
    Recommended packages:
    libatk1.0-data
    The following packages will be REMOVED:
    scim-gtk2-immodule
    The following NEW packages will be installed:
    firefox libatk1.0-0 libgtk2.0-0 libgtk2.0-bin
    libgtk2.0-common libpango1.0-0 libpango1.0-common
    0 upgraded, 7 newly installed, 1 to remove and 0 not upgraded.
    1 not fully installed or removed.
    Need to get 0B/10.4MB of archives.
    After unpacking 41.7MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Preconfiguring packages ...
    (Reading database ... 112808 files and directories currently installed.)
    Removing scim-gtk2-immodule ...
    /var/lib/dpkg/info/scim-gtk2-immodule.postrm: line 8: /usr/sbin/update-gtk-immodules: No such file or directory
    dpkg: error processing scim-gtk2-immodule (--remove):
    subprocess post-removal script returned error exit status 1
    Errors were encountered while processing:
    scim-gtk2-immodule
    Running prelink, please wait...
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    garylowe@ubuntu:~$

    Would someone be able to help me get this working please?

    Cheers

    Lowey
    I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

    #2
    Re: Unable to dpkg apps

    Try "sudo dpkg --configure -a". That command may tell you that you have a broken package. When you go into Synaptic (or whatever) to fix the broken package, it may tell you to run dkg --configure -a, etc,.ad infinitum. But it's worth a shot.

    Comment


      #3
      Re: Unable to dpkg apps

      Thanks for the reply, Al

      I tried your command and it told me nothing (big deal, lots of things tell ME nothing)

      garylowe@ubuntu:~$ sudo dpkg --configure -a
      garylowe@ubuntu:~$

      I can't download any packages at the minute because all I receive is the message in the first post, regardless of what package I try to install. So if I'm missing something, I can't even put it in through apt-get. I CAN'T EVEN INSTALL SYNAPTIC!!!!!!

      Enough panicking, now.

      Is there something that I can tell you that may assist?

      Cheers

      Lowey

      PS Australia is in the last 16 at the world cup. Did you see that?
      I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

      Comment


        #4
        Re: Unable to dpkg apps

        The problem is that the post-removal script for scim seems to require that you run something called "/usr/sbin/update-gtk-immodules", but it was removed earlier.so it can't be run.

        I wouldn't suggest this if your system were working properly because some program may get hung up because it can't install /usr/sbin/update-gtk-immodules, but, since you can't install anythig right now, you won't be any worse off. So, from a konsole, give the command "sudo touch /usr/sbin/update-gtk-immodules". This will create an empty file called /usr/sbin/update-gtk-immodules. When the post remval script runs it, it won't return anything. Hopefully, the post-rm script will regard that as the same thing as returning 0, which is what gets returned by a successful script. If it doesn't you'll have to edit the emty file to run one line something like "return 0". You should try to remember to remove the empty (or one line) script as soon as possible so that when you add programs that require gtk-immodules, they will be able to install the real program and reconfigure whatever.

        Comment


          #5
          Re: Unable to dpkg apps

          Thanks again, Al

          Added the line sudo touch /usr/sbin/update-gtk-immodules.

          Tried sudo apt-get install firefox and received same error message.

          Added Return 0 (zero) to /usr/sbin/update-gtk-immodules and then tried again with the same result.(Should that line have been return Oh or return zero?)

          Then, just for the hell of it, tried apt-get update and apt-get upgrade and received:-

          garylowe@ubuntu:~$ sudo apt-get upgrade
          Reading package lists... Done
          Building dependency tree... Done
          The following packages will be REMOVED:
          scim-gtk2-immodule
          0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
          1 not fully installed or removed.
          Need to get 0B of archives.
          After unpacking 319kB disk space will be freed.
          Do you want to continue [Y/n]? y
          (Reading database ... 112808 files and directories currently installed.)
          Removing scim-gtk2-immodule ...
          /var/lib/dpkg/info/scim-gtk2-immodule.postrm: line 8: /usr/sbin/update-gtk-immodules: Permission denied
          dpkg: error processing scim-gtk2-immodule (--remove):
          subprocess post-removal script returned error exit status 1
          Errors were encountered while processing:
          scim-gtk2-immodule
          Running prelink, please wait...
          E: Sub-process /usr/bin/dpkg returned an error code (1)
          garylowe@ubuntu:~$

          So, in a nutshell, no go.

          Really appreciate your help. Any more ideas would be most welcome.

          Cheers

          Lowey

          I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

          Comment


            #6
            Re: Unable to dpkg apps

            The error message is now DIFFERENT it says "permission denied", which implies that the empty file you created as sudo did not have the appropriate perms. A ls -l /usr/sbin/update-gtk-immodules indicates that shoud have perms 755 and ownership root:root. Use sudo chown and sudo chmod to make it so.

            Meanwhile the file is short enough that I figured I'd copy the whole thing for you:
            Code:
            #! /bin/sh
            
            set -e
            
            TMPFILE=`mktemp /tmp/gtk+-2.8.18.XXXXXXXXXX`
            apiver=2.0
            defaultver=2.8.0
            
            if [ "x$1" != "x" ]; then
            	VERSION=`echo $1 | sed -e 's/-[A-Za-z0-9\.]*$//' -e 's/+[A-Za-z0-9\.]*$//'`
            else
            	VERSION=$defaultver
            fi
            VERSION=2.4.0
            if ! test -d /usr/lib/gtk-$apiver/$VERSION/immodules; then
            	echo "You don't have immodules directory for version $VERSION."
            	echo "Use default version instead."
            	VERSION=$defaultver
            fi
            
            echo -n "Updating the IM modules list for GTK+-$VERSION..."
            /usr/bin/gtk-query-immodules-$apiver `find /usr/lib/gtk-$apiver/2.4.0/immodules -name '*.so'` > $TMPFILE
            if [ "x`cat $TMPFILE | grep -v '^#'`" = "x" ]; then
            	echo "the GTK+ IM modules was not found."
            else
            	echo "done."
            fi
            if ! test -d /etc/gtk-$apiver; then
            	echo -n "Creating /etc/gtk-$apiver..."
            	mkdir /etc/gtk-$apiver
            	echo "done."
            fi
            cp $TMPFILE /etc/gtk-$apiver/gtk.immodules
            chmod 644 /etc/gtk-$apiver/gtk.immodules
            
            rm -f $TMPFILE
            Now you can copy the real file into /usr/sbin with owner and group root:root and perms 755. But, it looks like it has a lot of ways to return errors, so you might be better off with something like:
            Code:
            #! /bin/sh
            echo "done"

            Comment


              #7
              Re: Unable to dpkg apps

              I know I'm being a pain but your instructions are a little over my head. Would it be possible to give me a step by step guide, please?

              Thanks for your trouble

              Lowey
              I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

              Comment


                #8
                Re: Unable to dpkg apps

                (1)Right click on the desktop. (2)Click "Run command" (3) Type "kdesu kate /usr/sbin/update-gtk-immodules" (4)When Kate comes up, enter either the original text of the script, (preferable), or my abbreviated version. (5) Save it. (6) In a konsole enter "sudo chown -v root:root /usr/sbin/update-gtk-immodules" (7) Enter " chmod 775 /usr/sbin/update-gtk-immodules" (8)run apt-get.

                Comment


                  #9
                  Re: Unable to dpkg apps

                  It told me this

                  garylowe@ubuntu:~$ sudo chown -v root:root /usr/sbin/update-gtk-immodules
                  Password:
                  ownership of `/usr/sbin/update-gtk-immodules' retained as root:root
                  \garylowe@ubuntu:~$ \chmod 775 /usr/sbin/update-gtk-immoduls
                  chmod: changing permissions of `/usr/sbin/update-gtk-immodules': Operation not permitted

                  Have I done something stupid?

                  I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

                  Comment


                    #10
                    Re: Unable to dpkg apps

                    Have I done something stupid?
                    No, I did. The command should have been "sudo chmod 755 /usr/sbin/update-gtk-immodules" Run "ls -l /usr/sbin/update-gtk-immodules" both before and after to see that the line ends up with "root root -rwxr-xr-x". If that's what it says before you start, you don't have to change it.

                    Comment


                      #11
                      Re: Unable to dpkg apps

                      Still no joy. Now have the "root root -rwxr-xr-x" permissions but still the same result. In my /usr/sbin/update-gtk-immodules file, I copied the larger of the two files you gave me. Sould I have done something with the one that read
                      #! /bin/sh
                      echo "done"
                      as well?
                      I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

                      Comment


                        #12
                        Re: Unable to dpkg apps

                        Thanks, Al it goes now.

                        I removed the large file you gave me from /usr/sbin/update-gtk-immodules
                        and replaced it with the smaller one. (#! /bin/sh
                        echo "done").
                        Thought I had nothing to lose and I didn't. Upgraded and it removed the scim file and I was able to install firefox.
                        Will keep going, now and hopefully it will keep going.

                        Thank you so much for your time and invaluable assistance. Good people like yourself will be the reason that this distro will succeed.

                        Cheers

                        Lowey
                        I wish I was the man my dog thinks I am.<br /><br />Registered Linux User No. 402825

                        Comment

                        Working...
                        X