Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Installation? What does that mean, exactly?
Hi all.
Since I tried my first few (unsuccessful) ./configure - make - make installs I came to wonder what I really did do. Let me explain:
I can understand the use of a data bases like rpm to keep track of existing libraries / programs and their assorted paths and dependencies (in part like the Win-Registry). But lately I tried to install K3b and in their FAQs I found the following: "Most likely you installed in the wrong directory. All KDE programs are installed in the KDE dirtree ... ". Huh?
I do not compile downloads in the KDE dirtree, since I don't want that cluttered up, but what the heck is ./configure --prefix=/opt/kde3 doing to or within the KDE dirtree?? I mean, there is no database there or what? What is the installing-process? Or rather, what happenes technically to my system? Is it getting mugged or what? And by logical extension, how can I uninstall, when there is no make uninstall?
Well, now I am really looking forward to your explanations.
./configure : checks if all needed libraries are present on the system the --prefix=/opt/kde3 tells the install file that it needs to install everything in /opt/kde3
make : compiles the sources to binaries
make install : copies the binaries to prefix
uninstall: just remove /opt/kde3
edit: hmm I should read more carefull, this is only if for example you've only installed 1 thing in /opt/kde3 - like kde3
Nah, there's no database unless you happen to be running a 3-rd party program to remember installs and such, and I imagine you'd know if you used one of them.
Basically, ./configure checks if you have everything you need to compile the program by checking for the existence of certain executables, libraries, header files etc. The '--prefix=/your/dir/here' part of the configure process is for the reference of the 'make install' stage of the installation process. You put in the directory that you want the program's install base to be. Configure outputs a Makefile (or a number of them) that contains the compile instructions that should work for your machine. When you type 'make', the Makefile is used invoking (usually) gcc to compile the source code of the program you downloaded into binary.
After make finishes, you still haven't touched the installation prefix you specified in ./configure. The final stage of the installation process, 'make install' basically copies all of the output files from 'make' into the directory you gave at the ./configure stage. So say for instance 'make' finishes successfully, but you don't 'make install', the program remains in it's extracted folder without touching anything in, for example /opt/kde3, /usr/local, etc.
Normally you don't compile programs in /opt/kde3 or any system wide directory like that (though some people like /usr/src I think...), because like you said, it clutters things up. I'm just lazy and compile programs from their extracted folder in my downloads directory.
One thing you shouldn't do is a 'make install' if your 'make' ended in an error, that's the impression I got you were doing from your message. When 'make' ends in an error, it means the program hasn't compiled right, and you won't particularly want to have broken pieces of programs in a global dir :-D
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Thank you both, iceman47 and Obi Perrin!
@iceman47:
I think I get it . make install just copies the binaries to the directory detailed in prefix. That's big words for only just copying (could do that myself even faster with cp binary), but if it works...
Hehe, rm /opt/kde3, I think even I would have noticed something, before I would hit enter...
@Obi Perrin:
I recently downloaded checkinstall, but I wanted to resolve my problems before I use it.
If I got you allright, I would just have to issue ./configure with --prefix and then make install to correct my problems, no new compiling necessary. By the way, make ended okay on my system, but thanks for the warnings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.