Step 1: Install Stow In this example, we are using CentOS, so we need the extended EPEL repository. You can install them using the following command: Then, the following command: Press Y to confirm the installation: Now that stow is installed, we have to choose where to store the package files. Step 2: Choose where to store the package file The normal "make install" command copies package files to various locations. Stow works by putting them all in one place in one directory, then creating symbolic links to where they are supposed to go. So we need to choose a directory for stow to save all the package files. By convention, this is usually: In this location, there is a directory for each package. So if we were to install the “hello” program we used as an example in the previous article, the files would be stored in: This location can be anything. Just to show, we will store the files in the following location: Step 3: Use "make install" with the "prefix" option We saw in the previous article that installing from source requires the following commands: ./configure make make install To install using stow, we just need to change the last step to: make install prefix=/home/testuser/stow/hello The "prefix" option tells us to put the package at a given location. This location is simply the directory selected in step 2 with the package name added as a separate folder. This will cause the file to be installed to the given location, as shown below: Now we place all the files we need in our package in a folder in the stow directory. Step 4: Complete the installation using stow To install the package, first "cd" into the stow directory like this: Make sure the folder containing the file is just one directory below your current location. Now type: The package is now installed on your system. Here is a screenshot of the "hello" command: Step 5: Remove the package The coolest part about loading is how easy it is to remove the pack from the system. No need to keep source packages or anything. Simply navigate to the stow directory, as shown in Step 4, and type: It's done! You can see below that the command no longer works after this step: As far as the system is concerned, the package has been completely removed! It's good to remember that the files don't actually disappear. They are still in the "hello" directory. You can easily install the package again using the stow command. If you don't need these files anymore, just delete the "hello" folder and your system is clean! Summarize The above is what I introduced to you on how to easily delete source installed software packages in Linux. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. Thank you very much for your support of 123WORDPRESS.COM You may also be interested in:
|
<<: Error mysql Table 'performance_schema...Solution
>>: VUE implements bottom suction button
As one of the most commonly used and important ut...
Table of contents Overview console.log console.in...
Table of contents Diffing Algorithm Layer-by-laye...
Linux task management - background running and te...
This article describes MySQL multi-table query wi...
I recently started learning Linux. After reading ...
Effect demo.html <html> <head> <me...
This rookie encountered such a problem when he ju...
Development Background: Recently, I am working on...
1. Transaction characteristics (ACID) (1) Atomici...
After adding –subnet to Docker network Create, us...
Now that we have finished the transform course, l...
Mysql-connector-java driver version problem Since...
I have been relearning HTML recently, which can be...
<br />In order to clearly distinguish the ta...