Arch Linux: Install Software From Source

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to top linux tech today we will be discussing about installing software on arch linux that is not found in the repositories or the aur meaning that you will have to download the source code from somewhere else and compile it yourself into a working binary and besides this process is not only for arch linux but it is also valid for any other linux distribution so what happens when you can find a specific software in your distribution repository or maybe the aur well chances are that it will be available as a source code or as a standalone installer package provided by the developer and we'll cover both methods in this example for this demonstration i'll be explaining on how to build a program directly from source by using the gnu auto tools which is a popular choice in the free software ecosystem which contains the gcc compiler and other binaries required for building an application directly from source code for this you will need to have the gcc compiler build utilities and libraries installed on your system for example in arch linux you'll need the base develop meta package and on debian or ubuntu systems for example you would need to have the build dash essential package installed otherwise the building process will fail now when building an application directly from source there always will be a manual on how to build the package usually you'll download the package and the instructions either from github or the developer's website in most cases so let's jump right now to one of my test machines and see how we can build a software from source for this demonstration i have chosen the dwm window manager and this simple terminal because they are very light minimal and very practical for this demo for the second installation demo i have chosen the foxit pdf reader to be installed directly from the developer's website okay so i'll just start one of my test machines right here i'm going to login and currently i do not have any desktop environment or window manager installed so this will be a perfect example of how you can install the dwm window manager for example so now i'll have to download the corresponding software from the developers website and because i have no graphical desktop environment i'm simply going to use a text based web browser in this case so i'll simply run a-links which is text-based web browser and navigate to cyclers.org now suckless is a combination of software projects that are usually very minimalistic in nature they contain the least amount of code which makes them fast stable and extremely lightweight so here i'm interested in the dwm window manager and the simple terminal so i'm going to navigate to the downloads section right now and simply download both applications so i'll choose to save this one in my downloads folder and i'll do the same for the simple terminal now these are extremely tiny so the downloads should have finished by now okay so i'll simply navigate into my downloads folder right now and let's list the directory contents and yeah there they are let's first extract the contents of both packages and then see how we can compile them from source okay i'll simply switch into the dwm folder and see the directory contents inside i'll just run my midnight commander here and the thing that you should check out first is the readme file which will obviously contain the instructions on how to build a package and here under the installation it clearly says that to build the package all you have to do is simply run the make clean install command now also the requirements will be listed and in this case we need the xlip header files but we already have that installed so so far so good i'm going to exit out of here and let's start the building process now in many cases within the build directory you will notice that there is a configure script this script checks for all of the available configuration in order to make sure that the project can be built otherwise when you run the script you'll get errors in form of missing dependencies which means that there are other dependencies that are not satisfied which you need to install first in order to proceed with the configure and the make program so you will usually have to run the script by typing dot forward slash configure and then press enter but in this case we have no such script because there's nothing really to configure here this is a very lightweight program so the next logical step is simply to run make then make install and finally make clean so here i will simply run the make command and press enter and this will actually grab the source code and compile it into a working binary now to be able to install this binary you need to execute the command make install and that's it it's just simple as that now of course this will have to be executed with super user privileges because this binary will be installed into the systems binary folder for which we do not have access as an ordinary user so run sudo make install and i will also include the clean command now you can run them separately just make install and then make clean and what clean does is actually cleaning the system from all of the build package cache that has been produced during compilation time and it is no longer necessary so i'll run all of this together so sudo make install clean provide my super user password press enter and that's it let's switch back to my downloads directory and also install this simple terminal so let's see what we have here the make file is there and there is no configure script so make and finally sudo make install clean and there we go now both the terminal and the window manager are installed within the system binary folders which means that we can execute the applications by simply typing in the command now here i'll simply run stardex to initialize my xor accession and run the dwm window manager and there we go the software has been installed correctly and as you can see it's quite operational now as with any window manager you'll have to configure your xynit rc file which i have done previously because i do a lot of experimenting with different window managers on this virtual machine this is not a dwm tutorial so i'm not going to cover the configuration of the dwm this time however i'm going to pause the video here and simply import my config files and then we can proceed towards installing another application and this time we'll download the installer directly from the developer there it is i have just customized it a little bit so i'll start firefox right now and navigate to foxy software this is a nice pdf reader so it will serve as a perfect example on how to install program from an installer provided by a developer so let's choose facet reader this software is proprietary but it is free and we need the linux 64-bit binary so i'll choose that save the file okay let's now navigate to my downloads folder and there it is facset reader it's also in tar archive so we'll have to extract it and now we have a run script that we can run to simply install this program so i'll run sudo dot forward slash fax it reader it ends on dot run and press enter provide my super user password and i'll simply choose the destination folder for the installation now the slash apt is perfect for any optional software so simply go with that click on next yes i accept the license and there we go the software is now installed and it can be simply called from the applications menu or from the terminal so let's try and run it right now fax it reader and there we go we can also do the same from the terminal and that's it this should be the usual case scenario of how you would install a program and compile it directly from source or use an installer provided by the developer now to uninstall these applications usually there will be an uninstallation script or something similar so let's check inside the installation folder and there's already an uninstalled.desktop script that you can run to uninstall this software and let's actually uninstall the dwm and the simple terminal right now so i'll simply navigate to my downloads folder and switch inside the sd terminal and run sudo make uninstall clean and as you can see the binary has been removed from the system and let's also do the same for the dwm and there we go right now the programs are operating in memory but once i terminate the session they will no longer be available which means that we have properly uninstalled a program that we have previously built from source so that's it i hope you enjoyed this video and if you did make sure to like comment share or subscribe and also feel free to ask me any questions that you might have this is top linux tech and i will see you next time
Info
Channel: Top Linux Tech
Views: 3,292
Rating: undefined out of 5
Keywords: Install software from source linux, Arch linux, GNU, make install, GCC, DWM, simple terminal, suckless software
Id: NAPEaNsyHPk
Channel Id: undefined
Length: 14min 17sec (857 seconds)
Published: Sun Oct 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.