web-dev-qa-db-ja.com

再インストールを希望するpython3を削除しましたが、実行できません

$ cat /etc./issue
$ Ubuntu 18.04.1 LTS

Sorcesからpython3.6とpython3.7をインストールしました。今、私はgnome-terminalをインストールしようとしています(これは、何らかの理由でpython3とともに削除されました)、次のコマンドを実行します。

$ Sudo apt-get install gnome-terminal

その行が実行され、次の出力が生成されます。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gnome-terminal : Depends: python3 but it is not going to be installed
                  Depends: python3-gi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

python3ですが、インストールされています。

$ python3 --version
$ Python 3.6.5

私が試した場合:

$ Sudo apt-get install python3

次のエラーが発生します。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3 : PreDepends: python3-minimal (= 3.6.5-3) but it is not going to be installed
           Depends: python3.6 (>= 3.6.5-2~) but it is not going to be installed
           Depends: libpython3-stdlib (= 3.6.5-3) but 3.6.7-1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

私が試した場合:

$ Sudo apt-get install python3-minimal

私は得ます:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-minimal : Depends: python3.6-minimal (>= 3.6.5-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

など...どうすればいいですか?私は完全にアイデアを使い果たしました...

2
Albert

あなたは適性を試すことができます:

  1. 次のようにaptitudeをインストールします:

    Sudo apt install aptitude
    
  2. 次のようにpython3をインストールします。

    Sudo aptitude install python3
    

Aptitudeは依存関係の解決に優れており、おそらくあなたの場合は成功するでしょう。

2
Raffa