.png)
Ubuntu 20.04.3 LTSを実行するRaspberry Piがあります。コマンドによって、2 つの異なるアーキテクチャが返されます。建築 64そしてARM64。なぜ?
CPU名
ubuntu@ubuntu:~$ hostnamectl
Static hostname: plex
Icon name: computer
Machine ID: 5d1b763f15314c999d1b33e60d8d556f
Boot ID: bdd535b62f134f6a9216543b36deb678
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.4.0-1047-raspi
Architecture: arm64
名前を明らかにする
ubuntu@ubuntu:~$ uname --all
Linux plex 5.4.0-1047-raspi #52-Ubuntu SMP PREEMPT Wed Nov 24 08:16:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
ありがとうございます! (これが問題の原因だと思います。何かをインストールしようとしましたが、arch64を探していましたが見つかりませんでしたが、amd64用のバージョンがあることがわかります。
答え1
aarch64
そしてarm64
それはまったく同じアーキテクチャです。ほとんどのパッケージャとパッケージマネージャはaarch64
名前を使用しますが、systemdの場合はarm64
ここで詳細情報を見つけることができます。
このコードでは、Arm64アーキテクチャのaarch64
マニュアルarm64
ページが標準指定子にも使用されます(どのマニュアルページかはわかりませんが、コードは次のようになります)。https://github.com/systemd/systemd/blob/5efbd0bf897a990ebe43d7dc69141d87c404ac9a/man/standard-specifiers.xml)。
このページは、そのアーキテクチャがsystemd.unitのマニュアルページにリストされていることを示しています。ここにエキスがありますman 5 systemd.unit
。
ConditionArchitecture=
Check whether the system is running on a specific
architecture. Takes one of "x86", "x86-64", "ppc", "ppc-le",
"ppc64", "ppc64-le", "ia64", "parisc", "parisc64", "s390",
"s390x", "sparc", "sparc64", "mips", "mips-le", "mips64",
"mips64-le", "alpha", "arm", "arm-be", "arm64", "arm64-be",
"sh", "sh64", "m68k", "tilegx", "cris", "arc", "arc-be", or
"native".
The architecture is determined from the information returned
by uname(2) and is thus subject to personality(2). Note that
a Personality= setting in the same unit file has no effect on
this condition. A special architecture name "native" is
mapped to the architecture the system manager itself is
compiled for. The test may be negated by prepending an
exclamation mark.
この簡単な調査で、私はsystemdがuname
システムコールを使用して内部的に印刷しaarch64
て変更することを推論しましたarm64
。