На старой машине Debian, на которой запущен squeeze, у меня неправильная установка jenkins, которая не позволяет мне выполнять самые основные действия, такие как установка, обновление и т.д.
Я пробовал бегать
sudo dpkg --remove --force-remove-reinstreq jenkins
dpkg: warning: overriding problem because --force enabled:
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
(Reading database ... 139335 files and directories currently installed.)
Removing jenkins ...
Found an incorrect Java version
Java version found:
java version "1.5.0" gij (GNU libgcj) version 4.4.5 Copyright (C) 2007 Free
Software Foundation, Inc. This is free software; see the source for copying
conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
Aborting
invoke-rc.d: initscript jenkins, action "stop" failed.
dpkg: error processing jenkins (--remove):
subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
jenkins
Я попытался обновить версию Java, следуя инструкциям здесь: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8
Но я получаю ошибку, аналогичную приведенной выше. Как я могу полностью удалить Дженкинс из машины, мне это не нужно?
Обновление: после попытки обновить версию Java теперь я получаю это:
Found an incorrect Java version
Java version found:
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze2)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
РЕДАКТИРОВАТЬ: попробовал ответ Антонио, но получил следующий вывод:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 33, in <module>
from ALChacks import *
File "/usr/share/apt-listchanges/ALChacks.py", line 32, in <module>
sys.stderr.write(_("Can't set locale; make sure $LC_* and $LANG are correct!\n"))
NameError: name '_' is not defined
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "sv_SE.UTF-8"
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
dpkg: error processing jenkins (--remove):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
configured to not write apport reports
Errors were encountered while processing:
jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)