特殊:Badtitle/NS100:Forum/software/OpenSource/SourceCode

来自Ubuntu中文
Wikibot留言 | 贡献2007年11月22日 (四) 12:46的版本 (新页面: {{From|https://help.ubuntu.com/community/forum/software/OpenSource/SourceCode}} {{Languages|UbuntuHelp:forum/software/OpenSource/SourceCode}} A computer runs bits of ones and zeros to get...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :Forum/software/OpenSource/SourceCode/zh | | {{#ifexist: Forum/software/OpenSource/SourceCode/zh | | {{#ifeq: {{#titleparts:Forum/software/OpenSource/SourceCode|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Forum/software/OpenSource/SourceCode|1|-1|}} | zh | | }}

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 like, 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