升级 DTC 版本失败

升级 DTC 版本失败

我尝试使用此方法升级DTC版本。

$ sudo apt install ./device-tree-compiler_1.4.7-1_amd64.deb

结果令人失望:

Reading package lists... Done Building dependency tree
Reading state information... Done 
Note, selecting 'device-tree-compiler' instead of './device-tree-compiler_1.4.7-1_amd64.deb' 
device-tree-compiler is already the newest version (1.4.7-1). 
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.

$ dtc -v
Version: DTC 1.4.0-gf345d9e4

我试过waltinator 的建议

$ sudo dpkg --install ./device-tree-compiler_1.4.7-1_amd64.deb
(Reading database ... 178854 files and directories currently installed.)
Preparing to unpack .../device-tree-compiler_1.4.7-1_amd64.deb ...
Unpacking device-tree-compiler (1.4.7-1) over (1.4.7-1) ...
Setting up device-tree-compiler (1.4.7-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

但dtc的版本还是没有升级。

$ dtc -v
Version: DTC 1.4.0-gf345d9e4

但是当我用这种方法查看dtc版本的时候结果是:

dpkg -s device-tree-compiler | grep '^Version:'
Version: 1.4.7-1

为什么会发生这种情况?可能是什么问题?

答案1

apt是包装系统的接口,需要安装的包名称。

安装文件的工具.debdpkg。阅读man dpkg并执行以下操作:

sudo dpkg --install ./device-tree-compiler_1.4.7-1_amd64.deb

答案2

您收到此消息是因为您手动下载了 device-tree-compiler_1.4.7-1_amd64.deb 并在本地安装了此 .deb 文件。如果您使用 Synaptic 软件包管理器安装sudo apt install synaptic并签入已安装(本地或过时)在左侧窗格中将显示 device-tree-compiler 是一个本地安装的包。

device-tree-compiler 位于所有当前支持的 Ubuntu 版本的默认存储库中。Ubuntu 18.04 中的 device-tree-compiler 版本为 1.4.5。在 Ubuntu 18.10 及更高版本中,可以使用以下命令从终端安装 device-tree-compiler 1.4.7:

sudo apt install device-tree-compiler

相关内容