个人工具

UbuntuHelp:Forum/software/OpenSource/SourceCode

来自Ubuntu中文

跳转至: 导航, 搜索

A computer runs bits of ones and zeros to get things done. Humans do not speak this language so programming languages were developed. A programmer has an idea and writes the code with a text editor. The code is compiled (by a compiler) or interpreted (by an interpreter) into binary (ones and zeros that the copmuter can understand). Anyone with a compatible computer, a compiler and the source code can build that program. Source code for most linux applications are available in tarball form, which is an archive of files. The archive is compressed using GZIP compression. Often you will see source code in this .tar.gz format. Usually, the source code uses standard tools to be built. Typically, to build an application from source, be sure you have 1- a compiler installed (gcc is the Gnu C Compiler - install the "build-essential" package to install the compiler tools you will need) 2 - all the necessary dependancies (-dev packages, like libncurses-dev). If an older version of the program is in the repositories you can install its dependancies:

sudo apt-get build-dep program

These dependancies may not be new enough for the program, in which case you will have to track them down (and install their dependancies) yourself. From the command line, unpack the source tarball archive:

tar xvzf program.tar.gz

enter the directory:

cd program

Automatically configure the source:

./configure

Build it:

make

install it:

sudo checkinstall