Error while installing deb file to a template

I am trying to install the latest neovim stable release. I downloaded the deb file form here: Release Nvim release build · neovim/neovim · GitHub

I check the sha256, and I move the deb file to my template.

But when I try to install it, I get the following error:

user@neovimLuaFromScratch:~ $ sudo apt install ./nvim-linux64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'neovim' instead of './nvim-linux64.deb'
The following packages were automatically installed and are no longer required:
  libluajit-5.1-2 libluajit-5.1-common libmsgpackc2 libtermkey1 libunibilium4 libvterm0 lua-luv neovim-runtime python3-greenlet python3-msgpack python3-neovim python3-pynvim
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  neovim
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.5 MB of archives.
After this operation, 29.2 MB of additional disk space will be used.
Get:1 /home/user/nvim-linux64.deb neovim amd64 0.8.3 [10.5 MB]
(Reading database ... 78435 files and directories currently installed.)
Preparing to unpack /home/user/nvim-linux64.deb ...
Unpacking neovim (0.8.3) over (0.4.4-1) ...
dpkg: error processing archive /home/user/nvim-linux64.deb (--unpack):
 trying to overwrite '/usr/share/applications/nvim.desktop', which is also in package neovim-runtime 0.4.4-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /home/user/nvim-linux64.deb
N: Download is performed unsandboxed as root as file '/home/user/nvim-linux64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Sub-process /usr/bin/dpkg returned an error code (1)
user@neovimLuaFromScratch:~ $

How do I install a deb file to a template, without creating a Standalone Template?

It works on my side:

user@debian-11-test:~$ sudo dpkg -i nvim-linux64.deb 
Selecting previously unselected package neovim.
(Reading database ... 119052 files and directories currently installed.)
Preparing to unpack nvim-linux64.deb ...
Unpacking neovim (0.8.3) ...
Setting up neovim (0.8.3) ...
Processing triggers for qubes-core-agent (4.1.40-1+deb11u1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.4-2) ...
user@debian-11-test:~$ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az183-550

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info
1 Like

I still get an error even though I tried with dpkg:

user@neovimLuaFromScratch:~ $ sudo dpkg -i ./nvim-linux64.deb
(Reading database ... 78435 files and directories currently installed.)
Preparing to unpack ./nvim-linux64.deb ...
Unpacking neovim (0.8.3) over (0.4.4-1) ...
dpkg: error processing archive ./nvim-linux64.deb (--install):
 trying to overwrite '/usr/share/applications/nvim.desktop', which is also in package neovim-runtime 0.4.4-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Processing triggers for qubes-core-agent (4.1.40-1+deb11u1) ...
Processing triggers for mailcap (3.69) ...
Errors were encountered while processing:
 ./nvim-linux64.deb
user@neovimLuaFromScratch:~ $

It looks like you already have nvim installed, try to remove it first with apt and install it from the .deb after

That’s true.

Alright.

Still getting the same error:

user@neovimLuaFromScratch:~ $  sudo apt remove neovim
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libluajit-5.1-2 libluajit-5.1-common libmsgpackc2 libtermkey1 libunibilium4 libvterm0 lua-luv neovim-runtime python3-greenlet python3-msgpack python3-neovim python3-pynvim
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  neovim
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3,928 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 78435 files and directories currently installed.)
Removing neovim (0.4.4-1) ...
update-alternatives: removing manually selected alternative - switching editor to auto mode
update-alternatives: using /bin/nano to provide /usr/bin/editor (editor) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/view (view) in auto mode
user@neovimLuaFromScratch:~ $ sudo apt install ./nvim-linux64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'neovim' instead of './nvim-linux64.deb'
The following packages were automatically installed and are no longer required:
  libluajit-5.1-2 libluajit-5.1-common libmsgpackc2 libtermkey1 libunibilium4 libvterm0 lua-luv neovim-runtime python3-greenlet python3-msgpack python3-neovim python3-pynvim
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  neovim
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.5 MB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Get:1 /home/user/nvim-linux64.deb neovim amd64 0.8.3 [10.5 MB]
Selecting previously unselected package neovim.
(Reading database ... 78425 files and directories currently installed.)
Preparing to unpack /home/user/nvim-linux64.deb ...
Unpacking neovim (0.8.3) ...
dpkg: error processing archive /home/user/nvim-linux64.deb (--unpack):
 trying to overwrite '/usr/share/applications/nvim.desktop', which is also in package neovim-runtime 0.4.4-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /home/user/nvim-linux64.deb
N: Download is performed unsandboxed as root as file '/home/user/nvim-linux64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Sub-process /usr/bin/dpkg returned an error code (1)
user@neovimLuaFromScratch:~ $ 

Try with dpkg instead

Sorry but still the same error:

user@neovimLuaFromScratch:~ $ sudo dpkg -i nvim-linux64.deb
(Reading database ... 78425 files and directories currently installed.)
Preparing to unpack nvim-linux64.deb ...
Unpacking neovim (0.8.3) ...
dpkg: error processing archive nvim-linux64.deb (--install):
 trying to overwrite '/usr/share/applications/nvim.desktop', which is also in package neovim-runtime 0.4.4-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Processing triggers for qubes-core-agent (4.1.40-1+deb11u1) ...
Processing triggers for mailcap (3.69) ...
Errors were encountered while processing:
 nvim-linux64.deb
user@neovimLuaFromScratch:~ $

Seems like _apt doesn’t have the needed permissions.

You can try this

Thanks for the response, and I will try this. But can you tell me why is there a problem with my apt all of a sudden?

No, I don’t know why there is a problem with your apt.

Maybe the problem always existed and this is the first package that triggers the fault.

Yeah I think this is the case.
It is weird because the neovimLuaFromScratch template I was using above is a clone of a minimal debian 11 template.

Now I moved the deb file into a copy of the debian-11 template, and run sudo apt install ./nvim-linux64.deb command:

user@temp-clone:~/QubesIncoming/neovimLuaFromScratch$ sudo apt install ./nvim-linux64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'neovim' instead of './nvim-linux64.deb'
The following packages were automatically installed and are no longer required:
  ethtool libbotan-2-17 libtspi1 net-tools
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  neovim
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.5 MB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Get:1 /home/user/QubesIncoming/neovimLuaFromScratch/nvim-linux64.deb neovim amd64 0.8.3 [10.5 MB]
Selecting previously unselected package neovim.
(Reading database ... 99974 files and directories currently installed.)
Preparing to unpack .../nvim-linux64.deb ...
Unpacking neovim (0.8.3) ...
Setting up neovim (0.8.3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for qubes-core-agent (4.1.40-1+deb11u1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for desktop-file-utils (0.26-1) ...
N: Download is performed unsandboxed as root as file '/home/user/QubesIncoming/neovimLuaFromScratch/nvim-linux64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

It has installed the neovim v0.8.3, but you can see the same error about _apt permissions is still lingering.

Also, applying this to neovimLuaFromScratch template didn’t solve the issue.

The real problem seems to be the following error message I get:

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

I am searching the web for answers to this.

I don’t know why it got fixed but I just did a sudo apt autoremove -y and tried installing the same deb package with apt and it worked:

user@neovimLuaFromScratch:~ $ sudo apt install ./nvim-linux64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'neovim' instead of './nvim-linux64.deb'
The following NEW packages will be installed:
  neovim
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.5 MB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Get:1 /home/user/nvim-linux64.deb neovim amd64 0.8.3 [10.5 MB]
(Reading database ... 76811 files and directories currently installed.)
Preparing to unpack /home/user/nvim-linux64.deb ...
Unpacking neovim (0.8.3) ...
Setting up neovim (0.8.3) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for qubes-core-agent (4.1.40-1+deb11u1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
N: Download is performed unsandboxed as root as file '/home/user/nvim-linux64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
user@neovimLuaFromScratch:~ $ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az183-550

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info
user@neovimLuaFromScratch:~ $

I am kinda confused, though. I think I removed the dependencies of neovim, and then I was able to install neovim again from its deb package. Don’t the deb packages still have dependencies?

The error is cleary stated: neovim-runtime owns the nvim.desktop file and
is in conflict with your neovim installation.
Because of that conflict, a kill signal was send to stop the installation.
Indicated by the output:

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

apt autoremove removed the neovim-runtime package and solved your issue.
Removing only this one would probably have solve it too.

This is not an error, it’s a note / notice.
It says that the _apt user dont have the permission to /home/user/nvim-linux64.deb.

more info … :
startpage.com/do/search?q=Download+is+performed+unsandboxed+as+root

1 Like

Thanks for the clarification.