Find the answer to your Linux question:
Results 1 to 3 of 3
Had a good search round both the forums and the internet and I'm a bit of a n00b to proper linux operations... can't seem to find anything that explicitly explains ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2003
    Location
    RHUL, UK
    Posts
    6

    How do you recompile programs?


    Had a good search round both the forums and the internet and I'm a bit of a n00b to proper linux operations... can't seem to find anything that explicitly explains how to recompile a program.

    Lots of things talk about using ./compile, but I presume this is when you download a new program and it comes with this executable; what happens if I already have a program installed and just want to recompile with with --extra-options?

  2. #2
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    to compile software with linux you need to have some stuff installed allready its probably on your cds. you should install gcc

    you will probably have the source code (src) for the program on your linux cd's if not you can download them easily enough. the src will be in a tarball (archive like .zip) i normaly save all the src i download to /home/variant/source (mplayer for example) so in a terminal cd to that dir:

    cd /home/variant/source

    then unpack the src archive like this:

    tar -xvzf mplayer.tar.gz (for .gz files)

    and

    tar -xvjf mplayer.tar.bz2 (for .bz2 files)

    this will extract the src code to a directoty named mplayer under the source dir.
    so cd to that directory and then type:

    configure

    this will configure the sourcecode for your system and may take a while depending on the package your compileing and the hardware you use, so if it seems to lock up for a while and your systems slow then just give it plenty of time.

    then type:

    make

    again this may take some time. now to install the software you should be root, so type

    "su" then hit enter (and type the root password)

    now finaly type

    make install

    the package should now be installed :)

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    In that source directory that you untarred and unziped, run this (in this order):
    Code:
    $ make clean
    $ make
    $ make install
    The best things in life are free.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •