I reached the moment of updating a .deb and I tried to update it via terminal. It's the Discord .deb so I entered sudo dpkg -i discord_0.0.28_all.deb
to get dpkg: error: unable to access archive "discord-0.0.28.deb": File or directory does not exist
and sudo dpkg -i discord-latest.deb
to get dpkg: error: unable to access archive "discord-latest.deb": File or directory does not exist
. The thing that confused me the most was that by starting the .deb I'm asked to open Discord or run the .deb but if I choose to open Discord obviously all I do is open the current Discord Updater which alerts me of the available update while if I choose to run the .deb its page is opened via GNOME Software but there I can only remove or open the current installed version of Discord. Since I thought I was doing the wrong way to run the updated .deb I decided to open it with another application and in fact usually archives are opened by default with Archive Manager, not Install with the Linux application, I realized that to see the contents I just had to run it with Archive Manager precisely. I also need to consider installing a management app for the .deb, .tar, GitHub and GitLab packages that I install so that I have an easy way to manage their available updates without finding myself with these problems when installing and applying the update, because then I end up taking an unreasonable amount of time to finish something properly and safely without damaging or making the system unstable. Also because since much of the software on Software Center is published on GitHub or GitLab and their related snap or flat is often abandoned or apparently abandoned (usually because third party repacked versions) I'll end up preferring to install GitHub or GitLab packages rather than their flat or snap versions despite via Software Center GUI is easier to manage, that's why I'll need a management app for the .deb, .tar, GitHub and GitLab packages. I want to keep my games updated because now I frequently help on their issues trackers so the updates have part of my contribution that I'd really like to test. This is another of the reasons for why I like Zorin OS a lot, since when I started I got involved much on helping developers to spot bugs on their games. An example is C-Dogs SDL, release 1.5.0, with many of my contributions.
I highly recommend Gdebi for managing .deb packages. It does come with a long list of dependencies, but they do not take up a lot of space.
When you double click a .deb file, Gdebi will immediately tell you if all dependencies are satisfied and you know you can safely proceed to install.
If dependencies are not satisfied - it tells you exactly which ones are missing. You can then search them on pkgs.org or right click > delete that .deb and try a different one that is formatted to your build.
This usually means that the dpkg command was run in terminal outside of the directory that contains the .deb package.
Please always remember to "Open the terminal" in the directory that contains the package so that it can find it. If you do not open within the directory, then include the full path to the .deb package in the command: For example if it is in downloads and you opened terminal in home directory with ctrl+alt+t
sudo dpkg -i ~/Downloads/discord_0.0.28_all.deb
OR change directory:
cd ~/Downloads/discord_0.0.28_all.deb
I believe Nautilus on Zorin OS comes with the "Open in terminal" on right click context menu by default...
I checked the Open in Terminal
option, it misses on files context menu but it's available on desktop and folders context menu.
So, without searching how it works exactly, I suppose that I can open only folders paths for then inserting a file path that they contain to apply to them a command, right? This is what I can understand after my first tests.
I tested drag and drop on terminal:
'/home/luca/Scaricati/discord-0.0.28.deb'
bash: /home/luca/Scaricati/discord-0.0.28.deb: Permission denied
I tested adding the .deb path:
sudo dpkg -i /home/luca/Scaricati/discord-0.0.28.deb
(Reading the database... 297928 currently installed files and directories.)
Preparations for extracting .../Downloaded/discord-0.0.28.deb...
Extracting discord (0.0.28) over (0.0.27)...
Configuring discord (0.0.28)...
Processing triggers for desktop-file-utils (0.24-1ubuntu3)...
Processing triggers for gnome-menus (3.36.0-1ubuntu1)...
Processing triggers for mime-support (3.64ubuntu1)...
MISSION COMPLETED!
