0

When I am trying to install the nRF command line tool.

After download the install file nrf-command-line-tools_10.17.0_amd64.deb, I change the permission to executable
-rwxrwxrwx 1 r0n9 r0n9 45888940 Aug 3 20:36 nrf-command-line-tools_10.17.0_amd64.deb*
But when I run ./nrf-command-line-tools_10.17.0_amd64.deb in the terminal, I got an error:

./nrf-command-line-tools_10.17.0_amd64.deb: line 1: syntax error near unexpected token `newline'
./nrf-command-line-tools_10.17.0_amd64.deb: line 1: `!<arch>'

Tried to install the package using dpkg

sudo dpkg -i ./nrf-command-line-tools_10.17.0_amd64.deb, I got the following error

(Reading database ... 365623 files and directories currently installed.)
Preparing to unpack .../nrf-command-line-tools_10.17.0_amd64.deb ...
Unpacking nrf-command-line-tools (10.17.0) over (10.17.0) ...
Setting up nrf-command-line-tools (10.17.0) ...
dpkg: error: dpkg frontend lock was locked by another process with pid 3565
Note: removing the lock file is always wrong, and can end up damaging the
locked area and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ>.
dpkg: error processing package nrf-command-line-tools (--install):
 installed nrf-command-line-tools package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 nrf-command-line-tools

But when I try to find the process by using ps ax | grep 3565 I got a result:
5507 pts/0 S+ 0:00 grep --color=auto 3565
When browsing the ps ax I found there no such process listed

...
   3224 ?        Sl     0:01 /usr/bin/nautilus --gapplication-service
   3341 ?        S      0:00 /usr/bin/python3 /usr/bin/gnome-terminal --wait
   3344 ?        Sl     0:00 /usr/bin/gnome-terminal.real --wait
   3347 ?        Ssl    0:01 /usr/libexec/gnome-terminal-server
   3375 pts/0    Ss     0:00 bash
   3588 ?        Sl     0:00 update-notifier
   3629 ?        SLl    0:12 /opt/google/chrome/chrome --enable-crashpad
   3635 ?        S      0:00 cat
   3636 ?        S      0:00 cat

...

Tried to kill the process blindly, I am getting:

sudo kill -9 3565 
kill: (3565): No such process

Edit 0: result of running sudo apt install

sudo apt install ./nrf-command-line-tools_10.17.0_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'nrf-command-line-tools' instead of './nrf-command-line-tools_10.17.0_amd64.deb'
nrf-command-line-tools is already the newest version (10.17.0).
The following packages were automatically installed and are no longer required:
  linux-headers-5.15.0-39 linux-headers-5.15.0-39-generic linux-image-5.15.0-39-generic
  linux-modules-5.15.0-39-generic linux-modules-extra-5.15.0-39-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up nrf-command-line-tools (10.17.0) ...
dpkg: error: dpkg database lock was locked by another process with pid 8814
Note: removing the lock file is always wrong, and can end up damaging the
locked area and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ>.
dpkg: error processing package nrf-command-line-tools (--configure):
 installed nrf-command-line-tools package post-installation script subprocess returned error exit st
atus 2
Errors were encountered while processing:

and BAU:

ps ax | grep 8814
10569 pts/0    S+     0:00 grep --color=auto 8814

Edit 1: Tried all answers in dpkg: error: dpkg status database is locked by another process, nothing resolves the issue.

I also tried to reboot the PC, but still getting the same issue after reboot. Any suggestions to fix the problem?

r0ng
  • 1,037

0 Answers0