Resolve Firefox dpkg error when reinstalling
I wanted to delete Firefox without much experience with Linux. I wanted Chrome to be my default browser, but it doesn't show up on Settings, so I searched with the file explorer 'firefox' and deleted all. Now I want to reinstall it, but it gives me this error message:
$ sudo apt-get install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
firefox is already the newest version (61.0.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up firefox (61.0.1-1) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing package firefox (--configure):
installed firefox package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
firefox
Configuring sandbox profiles....
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-cache policy firefox
output
$apt-cache policy firefox
firefox:
Installed: 61.0.1-1
Candidate: 61.0.1-1
Version table:
*** 61.0.1-1 1001
1001 http://deb.parrotsec.org/parrot stable/main amd64 Packages
100 /var/lib/dpkg/status
apt firefox dpkg
add a comment |
I wanted to delete Firefox without much experience with Linux. I wanted Chrome to be my default browser, but it doesn't show up on Settings, so I searched with the file explorer 'firefox' and deleted all. Now I want to reinstall it, but it gives me this error message:
$ sudo apt-get install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
firefox is already the newest version (61.0.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up firefox (61.0.1-1) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing package firefox (--configure):
installed firefox package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
firefox
Configuring sandbox profiles....
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-cache policy firefox
output
$apt-cache policy firefox
firefox:
Installed: 61.0.1-1
Candidate: 61.0.1-1
Version table:
*** 61.0.1-1 1001
1001 http://deb.parrotsec.org/parrot stable/main amd64 Packages
100 /var/lib/dpkg/status
apt firefox dpkg
5
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
Have you triedsudo apt-get install --reinstall firefox
?
– Soren A
Sep 3 '18 at 13:50
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
Please add output ofapt-cache policy firefox
to the question and specify your Ubuntu version.
– N0rbert
Sep 3 '18 at 14:00
add a comment |
I wanted to delete Firefox without much experience with Linux. I wanted Chrome to be my default browser, but it doesn't show up on Settings, so I searched with the file explorer 'firefox' and deleted all. Now I want to reinstall it, but it gives me this error message:
$ sudo apt-get install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
firefox is already the newest version (61.0.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up firefox (61.0.1-1) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing package firefox (--configure):
installed firefox package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
firefox
Configuring sandbox profiles....
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-cache policy firefox
output
$apt-cache policy firefox
firefox:
Installed: 61.0.1-1
Candidate: 61.0.1-1
Version table:
*** 61.0.1-1 1001
1001 http://deb.parrotsec.org/parrot stable/main amd64 Packages
100 /var/lib/dpkg/status
apt firefox dpkg
I wanted to delete Firefox without much experience with Linux. I wanted Chrome to be my default browser, but it doesn't show up on Settings, so I searched with the file explorer 'firefox' and deleted all. Now I want to reinstall it, but it gives me this error message:
$ sudo apt-get install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
firefox is already the newest version (61.0.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up firefox (61.0.1-1) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing package firefox (--configure):
installed firefox package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
firefox
Configuring sandbox profiles....
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-cache policy firefox
output
$apt-cache policy firefox
firefox:
Installed: 61.0.1-1
Candidate: 61.0.1-1
Version table:
*** 61.0.1-1 1001
1001 http://deb.parrotsec.org/parrot stable/main amd64 Packages
100 /var/lib/dpkg/status
apt firefox dpkg
apt firefox dpkg
edited Sep 3 '18 at 14:07
Mona
asked Sep 3 '18 at 13:39
MonaMona
83
83
5
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
Have you triedsudo apt-get install --reinstall firefox
?
– Soren A
Sep 3 '18 at 13:50
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
Please add output ofapt-cache policy firefox
to the question and specify your Ubuntu version.
– N0rbert
Sep 3 '18 at 14:00
add a comment |
5
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
Have you triedsudo apt-get install --reinstall firefox
?
– Soren A
Sep 3 '18 at 13:50
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
Please add output ofapt-cache policy firefox
to the question and specify your Ubuntu version.
– N0rbert
Sep 3 '18 at 14:00
5
5
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
Have you tried
sudo apt-get install --reinstall firefox
?– Soren A
Sep 3 '18 at 13:50
Have you tried
sudo apt-get install --reinstall firefox
?– Soren A
Sep 3 '18 at 13:50
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
Please add output of
apt-cache policy firefox
to the question and specify your Ubuntu version.– N0rbert
Sep 3 '18 at 14:00
Please add output of
apt-cache policy firefox
to the question and specify your Ubuntu version.– N0rbert
Sep 3 '18 at 14:00
add a comment |
1 Answer
1
active
oldest
votes
Create a file called firefox on your desktop (at ~/Desktop
) and copy the following text into it.
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <asac@jwsdot.com>
# Fabien Tassin <fta@sofaraway.org>
# Steve Langasek <steve.langasek@canonical.com>
# Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later
MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
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
Open the terminal and type:
sudo cp ~/Desktop/firefox /usr/bin/
The results of apt-cache policy firefox
show that Firefox is still installed. Remove everything that Firefox installed and reinstall Firefox.
sudo dpkg --remove --force-remove-reinstreq firefox # remove existing firefox package
sudo apt install firefox
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1071672%2fresolve-firefox-dpkg-error-when-reinstalling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Create a file called firefox on your desktop (at ~/Desktop
) and copy the following text into it.
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <asac@jwsdot.com>
# Fabien Tassin <fta@sofaraway.org>
# Steve Langasek <steve.langasek@canonical.com>
# Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later
MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
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
Open the terminal and type:
sudo cp ~/Desktop/firefox /usr/bin/
The results of apt-cache policy firefox
show that Firefox is still installed. Remove everything that Firefox installed and reinstall Firefox.
sudo dpkg --remove --force-remove-reinstreq firefox # remove existing firefox package
sudo apt install firefox
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
add a comment |
Create a file called firefox on your desktop (at ~/Desktop
) and copy the following text into it.
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <asac@jwsdot.com>
# Fabien Tassin <fta@sofaraway.org>
# Steve Langasek <steve.langasek@canonical.com>
# Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later
MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
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
Open the terminal and type:
sudo cp ~/Desktop/firefox /usr/bin/
The results of apt-cache policy firefox
show that Firefox is still installed. Remove everything that Firefox installed and reinstall Firefox.
sudo dpkg --remove --force-remove-reinstreq firefox # remove existing firefox package
sudo apt install firefox
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
add a comment |
Create a file called firefox on your desktop (at ~/Desktop
) and copy the following text into it.
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <asac@jwsdot.com>
# Fabien Tassin <fta@sofaraway.org>
# Steve Langasek <steve.langasek@canonical.com>
# Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later
MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
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
Open the terminal and type:
sudo cp ~/Desktop/firefox /usr/bin/
The results of apt-cache policy firefox
show that Firefox is still installed. Remove everything that Firefox installed and reinstall Firefox.
sudo dpkg --remove --force-remove-reinstreq firefox # remove existing firefox package
sudo apt install firefox
Create a file called firefox on your desktop (at ~/Desktop
) and copy the following text into it.
#!/bin/sh
set -e
# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.
# Authors:
# Alexander Sack <asac@jwsdot.com>
# Fabien Tassin <fta@sofaraway.org>
# Steve Langasek <steve.langasek@canonical.com>
# Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later
MOZ_LIBDIR=/usr/lib/firefox
MOZ_APP_LAUNCHER=`which $0`
MOZ_APP_NAME=firefox
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
Open the terminal and type:
sudo cp ~/Desktop/firefox /usr/bin/
The results of apt-cache policy firefox
show that Firefox is still installed. Remove everything that Firefox installed and reinstall Firefox.
sudo dpkg --remove --force-remove-reinstreq firefox # remove existing firefox package
sudo apt install firefox
edited 2 days ago
answered Sep 3 '18 at 14:10
karelkarel
58.6k13128147
58.6k13128147
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
add a comment |
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
ran without problems $sudo dpkg --remove --force-remove-reinstreq firefox (Reading database ... 463988 files and directories currently installed.) Removing firefox (61.0.1-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for man-db (2.8.4-2) ... Processing triggers for mime-support (3.61) ...
– Mona
Sep 3 '18 at 14:13
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
a bit long so.. pastebin.com/kGAs4mdu
– Mona
Sep 3 '18 at 14:15
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
thank you so much for the code, now sudo apt install works but i can't run firefox.. pastebin.com/uZPDUKKR
– Mona
Sep 3 '18 at 14:24
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1071672%2fresolve-firefox-dpkg-error-when-reinstalling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
You should never just delete files from applications that come with Ubuntu or are installed with dpkg or apt. Use apt to remove them.
– SurvivalMachine
Sep 3 '18 at 13:45
I understood this, does anyone know how to resolve this problem?
– Mona
Sep 3 '18 at 13:47
Have you tried
sudo apt-get install --reinstall firefox
?– Soren A
Sep 3 '18 at 13:50
It gives me <code>Reading package lists... Done Building dependency tree Reading state information... Done Package firefox is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: parrot-interface-common E: Package 'firefox' has no installation candidate </code>
– Mona
Sep 3 '18 at 13:53
Please add output of
apt-cache policy firefox
to the question and specify your Ubuntu version.– N0rbert
Sep 3 '18 at 14:00