apt は最新バージョンのパッケージのインストールを拒否します。

apt は最新バージョンのパッケージのインストールを拒否します。

Python 3.9をインストールしようとしていますが、Debianには3.7が付属しています。

を実行すると、sudo apt install python3.9次のメッセージが表示されます。

E: Unable to locate package python3.9
E: Couldn't find any package by glob 'python3.9'
E: Couldn't find any package by regex 'python3.9'

私が実行すると、sudo apt install python3次のような結果が得られます。

python3 is already the newest version (3.7.3-1).

私は手動で行って、Debianサーバーに実際にPython 3.9があることを発見しました。位置していますここ

debその後、Python 3.9ファイルをダウンロードして実行しましたが、sudo apt install ./python3.9*結果は次のようになります。

Note, selecting 'python3.9' instead of './python3.9_3.9.6-1_i386.deb'
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.9 : Depends: python3.9-minimal (= 3.9.6-1) but it is not installable
             Depends: libpython3.9-stdlib (= 3.9.6-1) but it is not installable
E: Unable to correct problems, you have held broken packages.

その後、両方のファイルをダウンロードしdebて同じことを試しましたが、「削除可能」な依存関係が増えました。

私が実行しているDebianのバージョンに合わせて設定されていないパッケージはインストールできないことを知っていますが、Python 3.9をインストールする方法はありますか?ソースからビルドせずにインストールする方法はありますか?

私はbusteri386(32ビット)アーキテクチャを備えたDebian 10.10()を実行しています。

私のソースリスト(オーストラリアミラーを使用しています):

deb http://ftp.au.debian.org/debian/ buster main
deb-src http://ftp.au.debian.org/debian/ buster main

deb http://ftp.au.debian.org/debian/ buster/updates main
deb-src http://ftp.au.debian.org/debian/ buster/updates main

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

ベストアンサー1

で見ることができますDebian Trackerそれ:

  • Debian 9( stretch/ oldstable) は 3.5.3 とともにリリースされました。
  • Debian 10( buster/ stable) は 3.7.3 で提供されます。
  • Debian 11( bullseye/ testing) は 3.9.2 とともにリリースされます
  • experimental3.9.4があります
  • python3次回は使用できません。stable-backports

bullseye数週間後にリリースされる予定です。dist-upgradeを実行するとbullseyepython3.9が得られます。これがあなたができる最も安全なことです。

experimentalあなたのパッケージに追加することができますが、souces.list非常にsudo apt install -t experimental python3重要なパッケージを交換しており、物事がうまくいかない場合はやや危険です。

また、注:Debian 10を使用している場合、すべてのデフォルトパッケージはpython3.7で動作します。 Pythonコードを直接書いて、特に新しいバージョンで提供されている機能を使用したくない限り、アップグレードする理由はほとんどありません。パッケージに依存している場合、pipほとんどはpython3-<pkg>Debian 10のpython3.7で動作します。

おすすめ記事