如何强制 Ubuntu 使用 amd64,而不是 i386

如何强制 Ubuntu 使用 amd64,而不是 i386

我有一台使用了一年的台式机,具有 64 位功能(这很正常?)。它运行的是 Ubuntu。安装时,我确保我有一个 amd64 内核(见下文)和 C 库。过去一年,我添加了随机软件。

APT 非常希望给我提供 32 位软件包。我想要一个开关/配置,apt-get如果软件包可用,则强制使用 64 位。我知道如何针对每个软件包执行此操作,但需要获得一切至 64 位。

有什么建议吗?总结:我的问题是我似乎无法使用包管理器的标准功能〜正确的硬件定位。如果最好的解决方案是重建盒子,那么我就会这么做。

$ uname -a
Linux meow 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ dpkg --print-foreign-architectures
amd64

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

 $ cat /proc/cpuinfo 
 processor       : 0
 vendor_id       : GenuineIntel
 cpu family      : 6
 model           : 61
 model name      : Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
 stepping        : 4
 microcode       : 0x16
 cpu MHz         : 2357.343
 cache size      : 4096 KB
 physical id     : 0
 siblings        : 4
 core id         : 0
 cpu cores       : 2
 apicid          : 0
 initial apicid  : 0
 fpu             : yes
 fpu_exception   : yes
 cpuid level     : 20
 wp              : yes
 flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts
 bugs            :
 bogomips        : 4788.91
 clflush size    : 64
 cache_alignment : 64
 address sizes   : 39 bits physical, 48 bits virtual
 power management:

最后,我可以apt list --installed使用 regex-fu 来提及 amd64,然后升级每个包,但这不是一个干净的解决方案。

我当前的关注点是python3:i386而不是python3:amd64。

编辑回复@bodhi.zazen:

 $ sudo apt-get install python3:amd64
 [sudo] password for user: 
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 You might want to run 'apt-get -f install' to correct these:
 The following packages have unmet dependencies.
  python3 : Conflicts: python3:amd64 but 3.5.1-3 is to be installed

(我知道有一个 python:amd64,因为它是其他工具的要求)

编辑回复@guiverc

 $ dpkg -l python3
 Desired=Unknown/Install/Remove/Purge/Hold
 ||/ Name                   Version          Architecture     Description
 +++-======================-================-================-==================================================
 ii  python3                3.5.1-3          i386             interactive high-level object-oriented language (d
 user@meow:~$ 
 user@meow:~$ aptitude why python3
 i   indicator-cpufreq Depends python3

编辑对@ravery 的回复 好的,从操作系统设计的角度来看,这更有意义。如果你以回复的形式发布,我会将其视为答案

答案1

dpkg --print-foreign-architectures 
amd64

这表明您安装的系统是 32 位的,因为 64 位对于您的系统架构来说是“外来的”。
这就是为什么 apt 一直为您提供 32 位软件包的原因。

解决方法是使用 64 位映像重新安装。

相关内容