Problem z apt-get install

Ogólne pytania dotyczące systemu
Janek
Posty: 14
Rejestracja: 17 listopada 2017, 23:43

Problem z apt-get install

Post autor: Janek »

Witam,

Tak więc najprawdopodobniej czeka nas droga przez mękę.
Przy każdym apt-get install, upgrade dostaje:

Kod: Zaznacz cały

 python3-uno : Wymaga: libreoffice-core (= 1:4.3.3-2+deb8u7) ale 1:4.3.3-2+deb8u9 ma zostać zainstalowany
E: Niespełnione zależności. Proszę spróbować wykonać "apt-get -f install" bez pakietów (lub podać rozwiązanie).
Po wpisaniu w konsole python3 włącza mi się python2.7.

usunąc libereoffice także nie mogę za pomocą apt-get purge itd.
Kiedy i przy czym padło nie pamiętam.

Może ręcznie jakoś wywalić libreoffice?

Dzięki za jakąkolwiek pomoc.
Awatar użytkownika
saturno
Junior Member
Posty: 741
Rejestracja: 08 lipca 2008, 20:04

Re: Problem z apt-get install

Post autor: saturno »

1. Wynik polecenia wstawiaj zawsze razem z poleceniem.
2. jaka wersja Debiana?
3. Jakie masz repozytoria?
4. Pokaż wynik polecenia:

Kod: Zaznacz cały

apt update && apt upgrade
Janek
Posty: 14
Rejestracja: 17 listopada 2017, 23:43

Re: Problem z apt-get install

Post autor: Janek »

Debian8 Jessie

Kod: Zaznacz cały

apt-get upgrade
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności       
Odczyt informacji o stanie... Gotowe
Należy uruchomić "apt-get -f install", aby je naprawić.
Następujące pakiety mają niespełnione zależności:
 python3-uno : Wymaga: libreoffice-core (= 1:4.3.3-2+deb8u7) ale 1:4.3.3-2+deb8u9 jest zainstalowany
E: Niespełnione zależności. Proszę spróbować użyć -f.

Kod: Zaznacz cały

apt-get install -f
  File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: ostrzeżenie: podproces poprzedni skrypt pre-removal zwrócił kod błędu 1
dpkg: próba wywołania skryptu z nowego pakietu ...
  File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: błąd przetwarzania archiwum /var/cache/apt/archives/python3-uno_1%3a4.3.3-2+deb8u9_amd64.deb (--unpack):
 podproces nowy skrypt pre-removal zwrócił kod błędu 1
  File "/usr/bin/py3compile", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3compile on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: błąd podczas czyszczenia środowiska:
 podproces zainstalowany skrypt post-installation zwrócił kod błędu 1
Wystąpiły błędy podczas przetwarzania:
 /var/cache/apt/archives/python3-uno_1%3a4.3.3-2+deb8u9_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Kod: Zaznacz cały

apt-get purge python3-uno libreoffice*
Pakiet "libreoffice-style-sifr" nie jest zainstalowany, więc nie zostanie usunięty
Pakiet "libreoffice-subsequentcheckbase" nie jest zainstalowany, więc nie zostanie usunięty
Pakiet "libreoffice-wiki-publisher" nie jest zainstalowany, więc nie zostanie usunięty
Należy uruchomić "apt-get -f install", aby naprawić poniższe problemy:
Następujące pakiety mają niespełnione zależności:
 mythes-en-us : Wymaga: libreoffice-core ale nie zostanie zainstalowany lub
                        openoffice.org-core (>= 1.9) ale nie da się go zainstalować
E: Niespełnione zależności. Proszę spróbować wykonać "apt-get -f install" bez pakietów (lub podać rozwiązanie).

Plus tak jak mówie python3 odpala pythona 2.7 i może z tego powdu świruje python3-uno. Nie wiem jak teraz ustawić żeby pod python3 odpalił pythona3.4 bo róznica mniejsza niż między 2 a 3. Chociaż to by i tak było dziwne bo 3 do Debiana chyba nie dają domyślnie a libereoffice jest odrazu z systemem.
Próbowałem ustawic aliasa w bashrc o tak python3='/usr/bin/python3.4, ale nie mógł załapać. Jak w bezpieczny sposób usunąc pakiet libereoffice ręcznie?

Wynik polecenia o który pytasz pokazuje to co w pierwszym poście. Ogólnie w necie mało na temat mojego problemu to co proponowali zrobiłem, tyle że u mnie padło całe apt-get install nie moge nic zainstalować bo woła to co w 1 poście dałem

@edit

Kod: Zaznacz cały

deb http://ftp.pl.debian.org/debian/ jessie main
deb-src http://ftp.pl.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.pl.debian.org/debian/ jessie-updates main
deb-src http://ftp.pl.debian.org/debian/ jessie-updates main

deb http://ftp.pl.debian.org/debian/ jessie contrib non-free
deb-src http://ftp.pl.debian.org/debian/ jessie contrib non-free

deb http://security.debian.org/ jessie/updates contrib non-free
deb-src http://security.debian.org/ jessie/updates contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://ftp.pl.debian.org/debian/ jessie-updates contrib non-free
deb-src http://ftp.pl.debian.org/debian/ jessie-updates contrib non-free
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

ziomal
Posty: 33
Rejestracja: 11 lutego 2017, 11:26

Re: Problem z apt-get install

Post autor: ziomal »

Kod: Zaznacz cały

apt-get -f install
a nie:

Kod: Zaznacz cały

apt-get install -f
Janek
Posty: 14
Rejestracja: 17 listopada 2017, 23:43

Re: Problem z apt-get install

Post autor: Janek »

Tak ,ale to nic nie zmienia.

Po dodaniu # -*- coding: utf-8 -*- do plików py3compile i py3clean dostaje:

Kod: Zaznacz cały

oot@debian:~# apt-get  install -f
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności       
Odczyt informacji o stanie... Gotowe
Naprawianie zależności... Gotowe
Zostaną zainstalowane następujące dodatkowe pakiety:
  python3-uno
Następujące pakiety zostaną zaktualizowane:
  python3-uno
1 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 35 nieaktualizowanych.
65 nie w pełni zainstalowanych lub usuniętych.
Konieczne pobranie 0 B/167 kB archiwów.
Po tej operacji zostanie dodatkowo użyte 0 B miejsca na dysku.
Kontynuować? [T/n] t
Odczytywanie dzienników zmian... Zrobione
(Odczytywanie bazy danych ... 185345 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do rozpakowania pakietu .../python3-uno_1%3a4.3.3-2+deb8u9_amd64.deb ...
import: unable to open image `sys': Jest katalogiem @ error/blob.c/OpenBlob/2712.
from: can't read /var/mail/glob
from: can't read /var/mail/os
from: can't read /var/mail/os.path
/usr/bin/py3clean: 32: /usr/bin/py3clean: Syntax error: word unexpected (expecting ")")
dpkg: ostrzeżenie: podproces poprzedni skrypt pre-removal zwrócił kod błędu 2
dpkg: próba wywołania skryptu z nowego pakietu ...
import: unable to open image `sys': Jest katalogiem @ error/blob.c/OpenBlob/2712.
from: can't read /var/mail/glob
from: can't read /var/mail/os
from: can't read /var/mail/os.path
/usr/bin/py3clean: 32: /usr/bin/py3clean: Syntax error: word unexpected (expecting ")")
dpkg: błąd przetwarzania archiwum /var/cache/apt/archives/python3-uno_1%3a4.3.3-2+deb8u9_amd64.deb (--unpack):
 podproces nowy skrypt pre-removal zwrócił kod błędu 2
import: unable to open image `sys': Jest katalogiem @ error/blob.c/OpenBlob/2712.
from: can't read /var/mail/os
from: can't read /var/mail/os.path
from: can't read /var/mail/subprocess
/usr/bin/py3compile: 34: /usr/bin/py3compile: Syntax error: word unexpected (expecting ")")
dpkg: błąd podczas czyszczenia środowiska:
 podproces zainstalowany skrypt post-installation zwrócił kod błędu 2
Wystąpiły błędy podczas przetwarzania:
 /var/cache/apt/archives/python3-uno_1%3a4.3.3-2+deb8u9_amd64.deb

@edit

czy jeżeli dodam do .bashrc na koniec

Kod: Zaznacz cały

alias python3='/usr/bin/python3.4'
to po ponownym uruchomieniu konsolii i wpisaniu python3 powinien uruchomic się python3.4?
Awatar użytkownika
marcin1982
Moderator
Posty: 1730
Rejestracja: 05 maja 2011, 12:59
Lokalizacja: Zagłębie Dąbrowskie

Re: Problem z apt-get install

Post autor: marcin1982 »

Przeżyjmy to jeszcze raz ... Podaj pełne wyniki poleceń - z konta roota:

Kod: Zaznacz cały

apt-get udpate

Kod: Zaznacz cały

apt-get -s dist-upgrade

Kod: Zaznacz cały

dpkg -l | grep "^rc"

Kod: Zaznacz cały

apt-cache policy
Odnośnie tego pytania:
to po ponownym uruchomieniu konsolii i wpisaniu python3 powinien uruchomic się python3.4?
Pokaż wynik:

Kod: Zaznacz cały

ls -l /etc/alternatives | grep python

PS
Poczytajcie - odnośniki.
Janek
Posty: 14
Rejestracja: 17 listopada 2017, 23:43

Re: Problem z apt-get install

Post autor: Janek »

Kod: Zaznacz cały

apt-get update
Pobrano 24,6 kB w 19s (1276 B/s)                                                                           
Czytanie list pakietów... Gotowe
W: Duplicate sources.list entry https://packagecloud.io/slacktechnologies/slack/debian/ jessie/main amd64 Packages (/var/lib/apt/lists/packagecloud.io_slacktechnologies_slack_debian_dists_jessie_main_binary-amd64_Packages)
W: Duplicate sources.list entry https://packagecloud.io/slacktechnologies/slack/debian/ jessie/main i386 Packages (/var/lib/apt/lists/packagecloud.io_slacktechnologies_slack_debian_dists_jessie_main_binary-i386_Packages)
W: Należy uruchomić apt-get update aby naprawić te problemy.

Kod: Zaznacz cały

apt-get -s dist-upgrade
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności       
Odczyt informacji o stanie... Gotowe
Należy uruchomić "apt-get -f install", aby je naprawić.
Następujące pakiety mają niespełnione zależności:
 python3-uno : Wymaga: libreoffice-core (= 1:4.3.3-2+deb8u7) ale 1:4.3.3-2+deb8u9 jest zainstalowany
E: Niespełnione zależności. Proszę spróbować użyć -f.

Kod: Zaznacz cały

dpkg -l | grep "^rc"
rc  idle-python3.4                        3.4.2-1                                    all          IDE for Python (v3.4) using Tkinter
rc  libapache2-mod-php5                   5.6.30+dfsg-0+deb8u1                       amd64        server-side, HTML-embedded scripting language (Apache 2 module)
rc  libapache2-mod-wsgi                   4.3.0-1                                    amd64        Python WSGI adapter module for Apache
rc  libapache2-mod-wsgi-py3               4.3.0-1                                    amd64        Python 3 WSGI adapter module for Apache
rc  libelfg0:amd64                        0.8.13-5                                   amd64        an ELF object file access library
rc  libglib2.0-bin                        2.42.1-1+b1                                amd64        Programs for the GLib library
rc  libonig2:amd64                        5.9.5-3.2+deb8u1                           amd64        Oniguruma regular expressions library
rc  libqdbm14                             1.8.78-5+b1                                amd64        QDBM Database Libraries without GDBM wrapper[runtime]
rc  libxml-commons-resolver1.1-java       1.2-7                                      all          XML entity and URI resolver library
rc  lxlauncher                            0.2.4-1                                    amd64        LXDE launcher for netbooks
rc  packagekit                            1.0.1-2                                    amd64        Provides a package management service
rc  php5-cli                              5.6.30+dfsg-0+deb8u1                       amd64        command-line interpreter for the php5 scripting language
rc  php5-common                           5.6.30+dfsg-0+deb8u1                       amd64        Common files for packages built from the php5 source
rc  php5-gd                               5.6.30+dfsg-0+deb8u1                       amd64        GD module for php5
rc  php5-json                             1.3.6-1                                    amd64        JSON module for php5
rc  php5-mysql                            5.6.30+dfsg-0+deb8u1                       amd64        MySQL module for php5
rc  php5-readline                         5.6.30+dfsg-0+deb8u1                       amd64        Readline module for php5
rc  user-setup                            1.61                                       all          Set up initial user and password
rc  wordpress                             4.1+dfsg-1+deb8u14                         all          weblog manager
[code]


[code]
apt-cache policy
Plików pakietów:
 100 /var/lib/dpkg/status
     release a=now
 500 http://packages.microsoft.com/repos/vscode/ stable/main amd64 Packages
     release o=vscode stable,a=stable,n=stable,l=vscode stable,c=main
     origin packages.microsoft.com
 500 https://packagecloud.io/slacktechnologies/slack/debian/ jessie/main i386 Packages
     release v=1,o=packagecloud.io/slacktechnologies/slack,a=jessie,n=jessie,l=slack,c=main
     origin packagecloud.io
 500 https://packagecloud.io/slacktechnologies/slack/debian/ jessie/main amd64 Packages
     release v=1,o=packagecloud.io/slacktechnologies/slack,a=jessie,n=jessie,l=slack,c=main
     origin packagecloud.io
 500 https://deb.nodesource.com/node_6.x/ jessie/main i386 Packages
     release o=Node Source,n=jessie,l=Node Source,c=main
     origin deb.nodesource.com
 500 https://deb.nodesource.com/node_6.x/ jessie/main amd64 Packages
     release o=Node Source,n=jessie,l=Node Source,c=main
     origin deb.nodesource.com
 500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ xenial/main Translation-en
 500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ xenial/main i386 Packages
     release v=16.04,o=LP-PPA-webupd8team-java,a=xenial,n=xenial,l=Oracle Java (JDK) 8 / 9 Installer PPA,c=main
     origin ppa.launchpad.net
 500 http://ppa.launchpad.net/webupd8team/java/ubuntu/ xenial/main amd64 Packages
     release v=16.04,o=LP-PPA-webupd8team-java,a=xenial,n=xenial,l=Oracle Java (JDK) 8 / 9 Installer PPA,c=main
     origin ppa.launchpad.net
 500 http://ftp.pl.debian.org/debian/ jessie-updates/non-free Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie-updates/main Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie-updates/contrib Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie-updates/non-free i386 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=non-free
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie-updates/contrib i386 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=contrib
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie-updates/main i386 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=main
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie-updates/non-free amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=non-free
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie-updates/contrib amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=contrib
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=main
     origin ftp.pl.debian.org
 500 http://security.debian.org/ jessie/updates/non-free Translation-en
 500 http://security.debian.org/ jessie/updates/main Translation-en
 500 http://security.debian.org/ jessie/updates/contrib Translation-en
 500 http://security.debian.org/ jessie/updates/non-free i386 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ jessie/updates/contrib i386 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/ jessie/updates/main i386 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 500 http://security.debian.org/ jessie/updates/non-free amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ jessie/updates/contrib amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/ jessie/updates/main amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/non-free Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie/main Translation-pl
 500 http://ftp.pl.debian.org/debian/ jessie/main Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie/contrib Translation-en
 500 http://ftp.pl.debian.org/debian/ jessie/non-free i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=non-free
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/contrib i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=contrib
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/main i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=main
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/non-free amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=non-free
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/contrib amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=contrib
     origin ftp.pl.debian.org
 500 http://ftp.pl.debian.org/debian/ jessie/main amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=main
     origin ftp.pl.debian.org
Przypięte pakiety:
[/code]

Kod: Zaznacz cały

ls -l /etc/alternatives | grep python
lrwxrwxrwx 1 root root  44 sty  2  2017 rst2html -> /usr/share/docutils/scripts/python2/rst2html
lrwxrwxrwx 1 root root  45 sty  2  2017 rst2latex -> /usr/share/docutils/scripts/python2/rst2latex
lrwxrwxrwx 1 root root  43 sty  2  2017 rst2man -> /usr/share/docutils/scripts/python2/rst2man
lrwxrwxrwx 1 root root  43 sty  2  2017 rst2odt -> /usr/share/docutils/scripts/python2/rst2odt
lrwxrwxrwx 1 root root  54 sty  2  2017 rst2odt_prepstyles -> /usr/share/docutils/scripts/python2/rst2odt_prepstyles
lrwxrwxrwx 1 root root  49 sty  2  2017 rst2pseudoxml -> /usr/share/docutils/scripts/python2/rst2pseudoxml
lrwxrwxrwx 1 root root  42 sty  2  2017 rst2s5 -> /usr/share/docutils/scripts/python2/rst2s5
lrwxrwxrwx 1 root root  45 sty  2  2017 rst2xetex -> /usr/share/docutils/scripts/python2/rst2xetex
lrwxrwxrwx 1 root root  43 sty  2  2017 rst2xml -> /usr/share/docutils/scripts/python2/rst2xml
lrwxrwxrwx 1 root root  49 sty  2  2017 rst-buildhtml -> /usr/share/docutils/scripts/python2/rst-buildhtml
lrwxrwxrwx 1 root root  47 sty  2  2017 rstpep2html -> /usr/share/docutils/scripts/python2/rstpep2html
lrwxrwxrwx 1 root root  28 lut  3  2017 wx.pth -> /usr/lib/wx/python/wx3.0.pth
Awatar użytkownika
marcin1982
Moderator
Posty: 1730
Rejestracja: 05 maja 2011, 12:59
Lokalizacja: Zagłębie Dąbrowskie

Re: Problem z apt-get install

Post autor: marcin1982 »

Pokaż teraz:

Kod: Zaznacz cały

ls -la /etc/apt/sources.list.d

Kod: Zaznacz cały

cat /etc/apt/sources.list.d/*
Janek
Posty: 14
Rejestracja: 17 listopada 2017, 23:43

Re: Problem z apt-get install

Post autor: Janek »

Kod: Zaznacz cały

ls -la /etc/apt/sources.list.d
razem 24
drwxr-xr-x 2 root root 4096 wrz 29 12:28 .
drwxr-xr-x 6 root root 4096 lip 14 06:45 ..
-rw-r--r-- 1 root root  108 kwi 21  2017 nodesource.list
-rw-r--r-- 1 root root  193 lip 14 06:45 slack.list
-rw-r--r-- 1 root root  266 lip 13 13:48 slacktechnologies_slack.list
-rw-r--r-- 1 root root    0 lip 15 17:00 spotify.list
-rw-r--r-- 1 root root  193 wrz 29 12:28 vscode.list

Kod: Zaznacz cały

cat /etc/apt/sources.list.d/*
deb https://deb.nodesource.com/node_6.x jessie main
deb-src https://deb.nodesource.com/node_6.x jessie main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
# this file was generated by packagecloud.io for
# the repository at https://packagecloud.io/slacktechnologies/slack

deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
deb-src https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

Awatar użytkownika
marcin1982
Moderator
Posty: 1730
Rejestracja: 05 maja 2011, 12:59
Lokalizacja: Zagłębie Dąbrowskie

Re: Problem z apt-get install

Post autor: marcin1982 »

Usuniemy starszy plik:

Kod: Zaznacz cały

rm /etc/apt/sources.list.d/slacktechnologies_slack.list
Potem podaj;

Kod: Zaznacz cały

apt-get update
Zablokowany