abrowser uninstallation

7 risposte [Ultimo contenuto]
grimlok
Offline
Iscritto: 04/16/2013

Hello all,

I seem to have broken my abrowser... I try to uninstall it and it comes up with an error stating this:

'E: abrowser: subprocess installed pre-removal script returned error exit status 2'

The details following in the changes applied dialog state:

"(Reading database ... 172001 files and directories currently installed.)
Removing abrowser ...
update-alternatives: error: unable to read link `/etc/alternatives/x-www-browser': Invalid argument
dpkg: error processing abrowser (--remove):
subprocess installed pre-removal script returned error exit status 2
update-alternatives: using /usr/bin/abrowser to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode.
update-alternatives: error: unable to read link `/etc/alternatives/x-www-browser': Invalid argument
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
abrowser
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:"

Any suggestions? Even re-installing seems to give me errors....

G4JC
Offline
Iscritto: 03/11/2012

I believe because this is a core package the system is hickuping over removal since there will be no default browser. (e.g. update-alternatives)

To see current default (should be aBrowser):
sudo update-alternatives --display x-www-browser

To change this see here:
https://wiki.debian.org/FAQ/Gnome

You can try setting Midori as default while you reinstall aBrowser.
sudo apt-get install midori
Then see debian FAQ above on setting it as default.

For complete removal and re-install of aBrowser let's try...

  • sudo apt-get remove --purge abrowser
  • Delete .mozilla/abrowser/ in your home directory, should it still be there
  • Delete /etc/abrowser/, this is where your preferences and user-profiles are stored
  • Delete /usr/lib/abrowser/ should it still be there
  • Delete /usr/lib/abrowser-addons/ should it still be there
  • Then to install it again:
    sudo apt-get install abrowser
    sudo apt-get update && apt-get upgrade (just to be safe and up-to-date.)
    And use Debian FAQ to set it as default.

    If that still doesn't work there are some more down and dirty methods of forcing it to bypass the error, but I'm hoping that will work for you. :)

    grimlok
    Offline
    Iscritto: 04/16/2013

    It seems to be a problem with my x-www-browser file might be corrupted or something because doing the purge I get the same "update-alternatives: error: unable to read link `/etc/alternatives/x-www-browser': Invalid argument"

    Also when i ran sudo update-alternatives --display x-www-browser

    I also get "x-www-browser - auto mode
    update-alternatives: error: unable to read link `/etc/alternatives/x-www-browser': Invalid argument"

    G4JC
    Offline
    Iscritto: 03/11/2012

    Interesting. Can you run:
    sudo file /etc/alternatives/x-www-browser

    And if it exists paste the content of the file here via:
    gksu gedit /etc/alternatives/x-www-browser

    Sounds like it got deleted or corrupted as you mentioned.

    grimlok
    Offline
    Iscritto: 04/16/2013

    Contents of my x-www-browser file:
    ---------------------------------------------------------------------------------------------------------------------------

    #!/bin/sh

    set -e

    # Abrowser launcher containing a Profile migration helper for
    # temporary profiles used during alpha and beta phases.

    # Authors:
    # Alexander Sack <name at domain>
    # Fabien Tassin <name at domain>
    # Steve Langasek <name at domain>
    # Chris Coulson <name at domain>
    # License: GPLv2 or later

    MOZ_LIBDIR=/usr/lib/abrowser
    MOZ_APP_LAUNCHER=`which $0`
    MOZ_APP_NAME=abrowser
    MOZ_DEFAULT_PROFILEDIR=.mozilla/abrowser
    MOZ_PROFILEDIR=.mozilla/abrowser

    export MOZ_APP_LAUNCHER

    while [ ! -x $MOZ_LIBDIR/$MOZ_APP_NAME ] ; do
    if [ -L "$MOZ_APP_LAUNCHER" ] ; then
    MOZ_APP_LAUNCHER=`readlink -f $MOZ_APP_LAUNCHER`
    MOZ_LIBDIR=`dirname $MOZ_APP_LAUNCHER`
    else
    echo "Can't find $MOZ_LIBDIR/$MOZ_APP_NAME"
    exit 1
    fi
    done

    usage () {
    $MOZ_LIBDIR/$MOZ_APP_NAME -h | sed -e 's,/.*/,,'
    echo
    echo " -g or --debug Start within debugger"
    echo " -d or --debugger Specify debugger to start with (eg, gdb or valgrind)"
    echo " -a or --debugger-args Specify arguments for debugger"
    }

    moz_debug=0
    moz_debugger_args=""
    moz_debugger="gdb"

    while [ $# -gt 0 ]; do
    case "$1" in
    -h | --help )
    usage
    exit 0
    ;;
    -g | --debug )
    moz_debug=1
    shift
    ;;
    -d | --debugger)
    moz_debugger=$2;
    if [ "${moz_debugger}" != "" ]; then
    shift 2
    else
    echo "-d requires an argument"
    exit 1
    fi
    ;;
    -a | --debugger-args )
    moz_debugger_args=$2;
    if [ "${moz_debugger_args}" != "" ] ; then
    shift 2
    else
    echo "-a requires an argument"
    exit 1
    fi
    ;;
    -- ) # Stop option processing
    shift
    break
    ;;
    * )
    break
    ;;
    esac
    done

    if [ $moz_debug -eq 1 ] ; then
    case $moz_debugger in
    memcheck)
    debugger="valgrind"
    ;;
    *)
    debugger=$moz_debugger
    ;;
    esac

    debugger=`which $debugger`
    if [ ! -x $debugger ] ; then
    echo "Invalid debugger"
    exit 1
    fi

    case `basename $moz_debugger` in
    gdb)
    exec $debugger $moz_debugger_args --args $MOZ_LIBDIR/$MOZ_APP_NAME "$@"
    ;;
    memcheck)
    echo "$MOZ_APP_NAME has not been compiled with valgrind support"
    exit 1
    ;;
    *)
    exec $debugger $moz_debugger_args $MOZ_LIBDIR/$MOZ_APP_NAME "$@"
    ;;
    esac
    else
    exec $MOZ_LIBDIR/$MOZ_APP_NAME "$@"
    fi

    ---------------------------------------------------------------------------------------------------------------------------

    G4JC
    Offline
    Iscritto: 03/11/2012

    Interesting, that part seems right. Here is a copy of my working one:
    http://pastebin.com/0J5yfr6V

    I'd wait until someone with the inner workings of galternative (Gnome update-alternatives) replies. Or if your feeling adventurous here's some troubleshooting ideas I would try:

    • sudo rm /etc/alternatives/x-www-browser
    • // Remove the pesky thing

    • sudo apt-get remove --purge abrowser
    • // try and uninstall again

    • sudo apt-get install abrowser
    • // re-install (if we get this far)

    • sudo file /etc/alternatives/x-www-browser
    • // does file exist after re-install?

    • sudo ln -s /usr/bin/abrowser /etc/alternatives/x-www-browser
    • // if not, let's fix it... with a new symlink: http://kb.iu.edu/data/abbe.html

      grimlok
      Offline
      Iscritto: 04/16/2013

      I believe that did it sir. Thanks muchly!

      grimlok
      Offline
      Iscritto: 04/16/2013

      Now the question is. How does one install a new browser from the tar files instead of a package so that it is integrated into the system like abrowser.

      I updated the symbolic links to point to my browser, but that doesn't seem to be the only thing. Programs that invoke a browser like Liferea still want to invoke a non-existent abrowser.

      Any thoughts?

      Here's what I followed to change the symlinks:

      http://www.shallowsky.com/blog/2012/Jun/16/