Howto compile » Historie » Version 1
Jeremias Keihsler, 13.01.2017 10:47
1 | 1 | Jeremias Keihsler | h1. HowTo compile sources |
---|---|---|---|
2 | |||
3 | h2. Preliminary note |
||
4 | |||
5 | * check if this is really necessary |
||
6 | * check http://pkgs.org/ for packages already available |
||
7 | * check the developer-site for ready made .rpm-packages |
||
8 | * check for similar _and_ available packages |
||
9 | |||
10 | *compiling code should be the last resort. Always. Period.* |
||
11 | |||
12 | Most of this is taken from http://www.tuxfiles.org/linuxhelp/softinstall.html |
||
13 | |||
14 | h2. download |
||
15 | |||
16 | While you can put your source code everywhere it's common to place to: @/usr/local/src@ |
||
17 | |||
18 | h2. compile and install |
||
19 | |||
20 | the installation procedure for software that comes in tar.gz and tar.bz2 packages isn't always the same, but usually it's like this: |
||
21 | |||
22 | <pre><code class="bash"> |
||
23 | tar xvzf package.tar.gz (or tar xvjf package.tar.bz2) |
||
24 | cd package |
||
25 | ./configure |
||
26 | make |
||
27 | make install |
||
28 | </code></pre> |
||
29 | |||
30 | If you're lucky, by issuing these simple commands you unpack, configure, compile, and install the software package and you don't even have to know what you're doing. However, it's healthy to take a closer look at the installation procedure and see what these steps mean. http://www.tuxfiles.org/linuxhelp/softinstall.html |
||
31 | |||
32 | h2. uninstall |
||
33 | |||
34 | So, you decided you didn't like the program after all? Uninstalling the programs you've compiled yourself isn't as easy as uninstalling programs you've installed with a package manager, like rpm. |
||
35 | If you want to uninstall the software you've compiled yourself, do the obvious: do some old-fashioned RTFM'ig. Read the documentation that came with your software package and see if it says anything about uninstalling. If it doesn't, you can start pulling your hair out. |
||
36 | If you didn't delete your Makefile, you may be able to remove the program by doing a @make uninstall@: |
||
37 | |||
38 | <pre><code class="bash"> |
||
39 | cd package |
||
40 | make uninstall |
||
41 | </code></pre> |
||
42 | |||
43 | If you see weird text scrolling on your screen (but at this point you've probably got used to weird text filling the screen? :-) that's a good sign. If make starts complaining at you, that's a bad sign. Then you'll have to remove the program files manually. |
||
44 | If you know where the program was installed, you'll have to manually delete the installed files or the directory where your program is. If you have no idea where all the files are, you'll have to read the Makefile and see where all the files got installed, and then delete them. |