Когда я пытаюсь установить Firefox через Центр приложений Ubuntu, он начинает применять изменения без предварительной загрузки пакетов, а затем я получаю следующее сообщение:
Package Operation Failed
The installation or removal of the package failed
Подробности:
installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package firefox.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 225197 files and directories currently installed.)
Unpacking firefox (from .../firefox_20.0+build1-0ubuntu0.12.10.3_i386.deb) ...
Selecting previously unselected package firefox-globalmenu.
Unpacking firefox-globalmenu (from .../firefox-globalmenu_20.0+build1-0ubuntu0.12.10.3_i386.deb) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up firefox (20.0+build1-0ubuntu0.12.10.3) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of firefox-globalmenu:
firefox-globalmenu depends on firefox (= 20.0+build1-0ubuntu0.12.10.3); however:
Package firefox is not configured yet.
dpkg: error processing firefox-globalmenu (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
firefox
firefox-globalmenu
Error in function:
Setting up firefox (20.0+build1-0ubuntu0.12.10.3) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of firefox-globalmenu:
firefox-globalmenu depends on firefox (= 20.0+build1-0ubuntu0.12.10.3); however:
Package firefox is not configured yet.
dpkg: error processing firefox-globalmenu (--configure):
dependency problems - leaving unconfigured
Примечание: я уже пытался установить Firefox ранее, но при загрузке возникла ошибка, поэтому я скачал Firefox с официального сайта и следовал инструкциям, которые нашел наhttps://help.ubuntu.com/community/FirefoxNewVersion/MozillaBuilds Это позволило мне использовать Firefox, но затем я подумал, что использование сборки из USC будет лучше, так как она будет обновляться сама. Поэтому я удалил сборку Mozilla и попытался установить ее снова из USC, после чего получил указанную выше ошибку. Я подозреваю, что моя попытка использовать сборку Mozilla могла быть причиной ошибки.
Итак, когда я ввел «sudo apt-get install firefox» в терминале, я получил это:
sudo apt-get install firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
freegish-data gir1.2-gconf-2.0 gir1.2-unique-3.0 libunique-3.0-0
ndiswrapper-common ndiswrapper-utils-1.9 python-compizconfig
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
firefox-globalmenu
Suggested packages:
latex-xft-fonts firefox-gnome-support
The following NEW packages will be installed:
firefox firefox-globalmenu
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/24.6 MB of archives.
After this operation, 51.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously unselected package firefox.
(Reading database ... 225197 files and directories currently installed.)
Unpacking firefox (from .../firefox_20.0+build1-0ubuntu0.12.10.3_i386.deb) ...
Selecting previously unselected package firefox-globalmenu.
Unpacking firefox-globalmenu (from .../firefox-globalmenu_20.0+build1-0ubuntu0.12.10.3_i386.deb) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Setting up firefox (20.0+build1-0ubuntu0.12.10.3) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
E: Sub-process /usr/bin/dpkg returned an error code(1)'
после чего я получил отчет о столкновении.
решение1
Нажмите Ctrl+ Alt+ T, чтобы открыть терминал и выполнить следующие команды:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install firefox
Если проблема не решена, попробуйте следующие решения:
Переустановите/установите языковой пакет:
sudo apt-get install --reinstall language-pack-en
(Повторно)создайте и перенастройте локали:
sudo locale-gen sudo dpkg-reconfigure locales
Окончательное решение — вручную задать
LANG
переменную, изменив/etc/default/locale
.
Откройте/etc/default/locale
в вашем любимом редакторе:gksudo gedit /etc/default/locale
и установите
LANG=
дляen_US.UTF-8
любого используемого вами языка, например:LANG=en_US.UTF-8
Изменения вступят в силу после перезагрузки.
После получения дополнительной информации от OP проблема была решена путем запуска:
sudo apt-get clean
sudo apt-get install firefox
Источники: Документация Ubuntu, Форумы Ubuntu, Супер пользователь