What's the opposite of 'make install', i.e. how do you uninstall a library in Linux?

后端 未结 12 614
旧巷少年郎
旧巷少年郎 2020-11-28 17:08

While running

./configure --prefix=/mingw 

on a MinGW/MSYS system for a library I had previously run

\'./configure --pref         


        
12条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 17:33

    Make

    Make is the program that’s used to install the program that’s compiled from the source code. It’s not the Linux package manager so it doesn’t keep track of the files it installs. This makes it difficult to uninstall the files afterward.

    The Make Install command copies the built program and packages into the library directory and specified locations from the makefile. These locations can vary based on the examination that’s performed by the configure script.

    CheckInstall

    CheckInstall is the program that’s used to install or uninstall programs that are compiled from the source code. It monitors and copies the files that are installed using the make program. It also installs the files using the Linux package manager which allows it to be uninstalled like any regular package.

    The CheckInstall command is used to call the Make Install command. It monitors the files that are installed and creates a binary package from them. It also installs the binary package with the Linux package manager.

    Replace "source_location.deb" and "name" with your information from the Screenshot.

    Execute the following commands in the source package directory:

    1. Install CheckInstall sudo apt-get install checkinstall
    2. Run the Configure script sudo ./configure
    3. Run the Make command sudo make
    4. Run CheckInstall sudo checkinstall
    5. Reinstall the package sudo dpkg --install --force-overwrite source_location.deb
    6. Remove the package sudo apt remove name

    Here's an article article I wrote that covers the whole process with explanations.

提交回复
热议问题