🕐 Duration: Minutes
🔧 Difficulty:Easy
🌟🌟🌟 Interest: Interesting
Another small tutorial that might help you win some time but where you need to be warned before playing the sorcerer's apprentice.
If you are missing a software on your Raspberry Pi and want to try to avoid recompiling it from scratch, this tutorial might be a good source of information for you.
You will indeed sometimes notice that the binary you want to install is not provided by your distribution (for example, Raspberry Pi OS 32 bits buster) but is provided by a neighbour one (here, Debian buster).
This gives you 2 choices to get your binary running:
- Compile it from source and install it manually
- Get a foreign package and hybrid your installation
We are going to see the second option here.
Foreign package: what to know
You sometimes hear that Raspberry Pi OS or Raspbian is an optimised Debian for Raspberry Pi. This means that you will at some point be able to install Debian packages in Raspbian but you should be careful. Actually both distributions have their own lives and that means that they have their own versions of runtime libraries.
This point is very important on 2 aspects:
- If you install a runnable from Debian and try to run it on Raspbian it might not work because of runtime errors. For example, installing foreign VCMI will not save you from the end-of-battle bug.
- If you install a runnable from Debian and this runnable takes the place of one from Raspbian distribution, your apt-get might misbehave and stop finding the good packages to install. The risk of corrupting your distribution is not zero. If you are using your operating system for a general purpose, you should avoid foreign packages.
Therefore you should consider installing foreign packages only for final programs (aka programs that you will just run and that will use libraries from your distribution) and avoid at all cost installing foreign libraries. If ever you want to install a foreign library consider your distribution as corrupted and unusable for installing and compiling binaries. Trying to install or compile programs on a corrupted distribution can cause an unnecessary loss of time that sometimes counts itself in weeks.
That said, installing a foreign package can save you hours of compilation if you know what you are doing. For example, the VCMI installation from Debian packages will run fine if you provide the adequate runtime libraries.
Also another good point of foreign package is that they will install everything themselves: pkgconfig, desktop entry... just like a classic install.
I want to install a foreign package, how should I do?
This is actually one of the simplest tutorials on here because the most important is the warning hereabove. You could damage your operating system. That said, let's go to the operations:
- Download the package from packages.debian.org
Package can be found by searching on Google or searching directly on https://packages.debian.org/stable/allpackages (long to load). Make sure to select ARM hard float (armhf) version.
|
Debian package page entry "VCMI". Armhf version is availlable.
|
- Once downloaded you can install it with "sudo dpkg -i packagename.deb"
This will just place your package in the right directories and deploy the desktop and menu entries. Package will normally not be runnable at this point.
|
Unpacking VCMI in the right directories with dpkg -i
|
|
- Then simply run sudo apt-get -f to fix the missing dependencies. This might fail if your foreign package has dependencies that aren't provided by your distribution.
|
sudo apt-get install -f will fix unsatisfied dependencies with the ones available on the current distribution |
Your package should be installed and ready to run in RPD/LXDE. For example, this can also be applied when wanting to install Vivaldi internet browser.
In our current test case, VCMI will crash when leaving battle (eg. retreating). The purpose of this article was pure installation. If you want to get VCMI completely operational, you should provide it the adequate set of libraries. See my other blog post "
Case study: Heroes of Might and Magic III on Pi [VCMI]" if you just want to get VCMI working.
Conclusion
Installing foreign packages is sure a decent opportunity that should nevertheless be only used if you know what you are doing.
Dangerously easy to perform that's for sure, it can give you trouble that you will not even realize you caused it yourself by corrupting your distribution.
If your objective is only to install some piece of a foreign package and if you are sure of yourself and are ready to mark your operating system as corrupted, go ahead. Otherwise compiling binaries is most of the time safer and more rewarding for example if you want to make your binary a portable app.
The pi gamer
No comments:
Post a Comment