0

I tried to use this method to upgrade the DTC version.

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

The result is disappointing:

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

I tried waltinator's suggestion,

$ 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) ...

But the version of dtc still not upgraded.

$ dtc -v
Version: DTC 1.4.0-gf345d9e4

However, when I use this method to view the dtc version, the result is:

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

Why is this happening? What could be the issue?

Kulfy
  • 17,696
suroot
  • 1
  • You haven't linked your question to Ubuntu in any way. We support Ubuntu (and official flavors) and not generic GNU/Linux. It's probable the dtc version found in your $PATH may not be the version you want? do you have multiple versions installed? Please provide the link to Ubuntu in your question. – guiverc Jul 12 '19 at 01:31
  • I am using this link to improve dtc:https://askubuntu.com/questions/1090223/how-to-upgrade-dtc-version-in-ubuntu-18-04/1157502#1157502 – suroot Jul 12 '19 at 02:07
  • 1
    apt 1.6.11 (amd64) ubuntu18.04 – suroot Jul 12 '19 at 02:09
  • Please [edit] your question to include the output of type -a dtc – steeldriver Jul 12 '19 at 07:35

2 Answers2

1

apt is an interface to the packaging system, and wants package names to install.

The tool to install a .deb file is dpkg. Read man dpkg and do something like:

sudo dpkg --install ./device-tree-compiler_1.4.7-1_amd64.deb
waltinator
  • 36,399
1

You got this message because you manually downloaded device-tree-compiler_1.4.7-1_amd64.deb and locally installed this .deb file. If you install Synaptic package manager with sudo apt install synaptic and check it in Installed (local or obsolete) in the left pane it will show that device-tree-compiler is a locally installed package.

device-tree-compiler is in the default repositories of all currently supported versions of Ubuntu. The version of device-tree-compiler in Ubuntu 18.04 is 1.4.5. In Ubuntu 18.10 and later device-tree-compiler 1.4.7 can be installed from the terminal with the following command:

sudo apt install device-tree-compiler
karel
  • 114,770