特殊:Badtitle/NS100:CheckInstall:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的8个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/CheckInstall}} | {{From|https://help.ubuntu.com/community/CheckInstall}} | ||
{{Languages|UbuntuHelp:CheckInstall}} | {{Languages|UbuntuHelp:CheckInstall}} | ||
== Introduction == | |||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconTip.png Use | CheckInstall keeps track of all files installed by a "make install" or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution. | ||
== | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconTip.png Use CheckInstall instead of just running "sudo make install", as that will likely put files all over the filesystem, with no easy way of removing them if things go wrong. If in the future you try to install a package that contains the same file as the software you are compiling, you will receive errors and the software you compiled may stop working. | ||
[[ | (In fact, checkinstall can keep track of files modified by ''any'' command line, not just a "make install", so you can use it for any type of installation task outside of apt, and it will keep track of the installation in the package manager.) | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=dont.png CheckInstall is not designed to produce packages suitable for distribution. Do not use it to produce packages intended for the Ubuntu archive or PPAs. Instead, follow the [[UbuntuWiki:PackagingGuide/Complete|Packaging|Guide]]. | |||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png From the [http://www.asic-linux.com.mx/~izto/checkinstall/docs/README checkinstall README]: "The Debian support in CheckInstall is still new, so handle it with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary." | |||
== Installation == | |||
Install the package <code><nowiki>checkinstall</nowiki></code> from the [[UbuntuHelp:Repositories/Ubuntu| Repositories]]. | |||
For help on installing software in Ubuntu, see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]. | |||
A quick method via the [[UbuntuHelp:UsingTheTerminal| terminal]] for those who like to copy and paste: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo aptitude install checkinstall | |||
</nowiki></pre> | </nowiki></pre> | ||
== Usage == | |||
Instead of | |||
<pre><nowiki> | <pre><nowiki> | ||
checkinstall | sudo make install | ||
</nowiki></pre> you will use | |||
<pre><nowiki> | |||
sudo checkinstall | |||
</nowiki></pre> | </nowiki></pre> | ||
When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied: | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo | sudo checkinstall make install_package | ||
</nowiki></pre> | </nowiki></pre> | ||
The installed package can then also easily be removed via [[UbuntuHelp:SynapticHowto#head-9a2bcc5a697205e980d6b8b3cac02f799e1bd5f0| Synaptic]] | |||
or via the terminal: | |||
The installed package can then also easily be removed via | |||
or | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo dpkg -r packagename | sudo dpkg -r packagename | ||
</nowiki></pre> | </nowiki></pre> | ||
== Use | Example: | ||
<pre><nowiki> | |||
sudo dpkg -r pidgin | |||
</nowiki></pre> | |||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png Note that the .deb package it creates can also be used elsewhere, which simplifies installation of the same program on many machines. | |||
== Use CheckInstall with auto-apt == | |||
You can use auto-apt when you want to build a simple package from source with checkinstall. You need to have [[UbuntuHelp:AutoApt|auto-apt]] installed! | You can use auto-apt when you want to build a simple package from source with checkinstall. You need to have [[UbuntuHelp:AutoApt|auto-apt]] installed! | ||
Instead of | Instead of | ||
第41行: | 第52行: | ||
sudo checkinstall | sudo checkinstall | ||
</nowiki></pre> | </nowiki></pre> | ||
== Related Links == | |||
* [[UbuntuHelp:SynapticHowto|SynapticHowto]] | |||
* [[UbuntuHelp:InstallingSoftware|InstallingSoftware]] | |||
* [[UbuntuHelp:CompilingSoftware|CompilingSoftware]] | |||
* [[UbuntuWiki:PackagingGuide/Complete|Packaging|Guide]] | |||
* [http://www.asic-linux.com.mx/~izto/checkinstall/ The checkinstall web site] | |||
---- | ---- | ||
[[category: | [[category:CategorySoftware]] [[category:CategoryCommandLine]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 21:52的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/CheckInstall }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/af | • {{#if: UbuntuHelp:CheckInstall|Afrikaans| [[::CheckInstall/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ar | • {{#if: UbuntuHelp:CheckInstall|العربية| [[::CheckInstall/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/az | • {{#if: UbuntuHelp:CheckInstall|azərbaycanca| [[::CheckInstall/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/bcc | • {{#if: UbuntuHelp:CheckInstall|جهلسری بلوچی| [[::CheckInstall/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/bg | • {{#if: UbuntuHelp:CheckInstall|български| [[::CheckInstall/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/br | • {{#if: UbuntuHelp:CheckInstall|brezhoneg| [[::CheckInstall/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ca | • {{#if: UbuntuHelp:CheckInstall|català| [[::CheckInstall/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/cs | • {{#if: UbuntuHelp:CheckInstall|čeština| [[::CheckInstall/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/de | • {{#if: UbuntuHelp:CheckInstall|Deutsch| [[::CheckInstall/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/el | • {{#if: UbuntuHelp:CheckInstall|Ελληνικά| [[::CheckInstall/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/es | • {{#if: UbuntuHelp:CheckInstall|español| [[::CheckInstall/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/fa | • {{#if: UbuntuHelp:CheckInstall|فارسی| [[::CheckInstall/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/fi | • {{#if: UbuntuHelp:CheckInstall|suomi| [[::CheckInstall/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/fr | • {{#if: UbuntuHelp:CheckInstall|français| [[::CheckInstall/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/gu | • {{#if: UbuntuHelp:CheckInstall|ગુજરાતી| [[::CheckInstall/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/he | • {{#if: UbuntuHelp:CheckInstall|עברית| [[::CheckInstall/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/hu | • {{#if: UbuntuHelp:CheckInstall|magyar| [[::CheckInstall/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/id | • {{#if: UbuntuHelp:CheckInstall|Bahasa Indonesia| [[::CheckInstall/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/it | • {{#if: UbuntuHelp:CheckInstall|italiano| [[::CheckInstall/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ja | • {{#if: UbuntuHelp:CheckInstall|日本語| [[::CheckInstall/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ko | • {{#if: UbuntuHelp:CheckInstall|한국어| [[::CheckInstall/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ksh | • {{#if: UbuntuHelp:CheckInstall|Ripoarisch| [[::CheckInstall/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/mr | • {{#if: UbuntuHelp:CheckInstall|मराठी| [[::CheckInstall/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ms | • {{#if: UbuntuHelp:CheckInstall|Bahasa Melayu| [[::CheckInstall/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/nl | • {{#if: UbuntuHelp:CheckInstall|Nederlands| [[::CheckInstall/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/no | • {{#if: UbuntuHelp:CheckInstall|norsk| [[::CheckInstall/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/oc | • {{#if: UbuntuHelp:CheckInstall|occitan| [[::CheckInstall/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/pl | • {{#if: UbuntuHelp:CheckInstall|polski| [[::CheckInstall/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/pt | • {{#if: UbuntuHelp:CheckInstall|português| [[::CheckInstall/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ro | • {{#if: UbuntuHelp:CheckInstall|română| [[::CheckInstall/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/ru | • {{#if: UbuntuHelp:CheckInstall|русский| [[::CheckInstall/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/si | • {{#if: UbuntuHelp:CheckInstall|සිංහල| [[::CheckInstall/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/sq | • {{#if: UbuntuHelp:CheckInstall|shqip| [[::CheckInstall/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/sr | • {{#if: UbuntuHelp:CheckInstall|српски / srpski| [[::CheckInstall/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/sv | • {{#if: UbuntuHelp:CheckInstall|svenska| [[::CheckInstall/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/th | • {{#if: UbuntuHelp:CheckInstall|ไทย| [[::CheckInstall/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/tr | • {{#if: UbuntuHelp:CheckInstall|Türkçe| [[::CheckInstall/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/vi | • {{#if: UbuntuHelp:CheckInstall|Tiếng Việt| [[::CheckInstall/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/yue | • {{#if: UbuntuHelp:CheckInstall|粵語| [[::CheckInstall/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/zh | • {{#if: UbuntuHelp:CheckInstall|中文| [[::CheckInstall/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/zh-hans | • {{#if: UbuntuHelp:CheckInstall|中文(简体)| [[::CheckInstall/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:CheckInstall | UbuntuHelp:CheckInstall | {{#if: | :}}CheckInstall}}/zh-hant | • {{#if: UbuntuHelp:CheckInstall|中文(繁體)| [[::CheckInstall/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:CheckInstall|:CheckInstall|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :CheckInstall/zh | | {{#ifexist: CheckInstall/zh | | {{#ifeq: {{#titleparts:CheckInstall|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:CheckInstall|1|-1|}} | zh | | }}
Introduction
CheckInstall keeps track of all files installed by a "make install" or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution. Use CheckInstall instead of just running "sudo make install", as that will likely put files all over the filesystem, with no easy way of removing them if things go wrong. If in the future you try to install a package that contains the same file as the software you are compiling, you will receive errors and the software you compiled may stop working. (In fact, checkinstall can keep track of files modified by any command line, not just a "make install", so you can use it for any type of installation task outside of apt, and it will keep track of the installation in the package manager.) CheckInstall is not designed to produce packages suitable for distribution. Do not use it to produce packages intended for the Ubuntu archive or PPAs. Instead, follow the Packaging|Guide. From the checkinstall README: "The Debian support in CheckInstall is still new, so handle it with care. It has been reported to work OK in some Debian systems and it certainly works OK in my Slackware development system with dpkg installed. Your mileage may vary."
Installation
Install the package checkinstall
from the Repositories.
For help on installing software in Ubuntu, see InstallingSoftware.
A quick method via the terminal for those who like to copy and paste:
sudo aptitude install checkinstall
Usage
Instead of
sudo make install
you will use
sudo checkinstall
When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied:
sudo checkinstall make install_package
The installed package can then also easily be removed via Synaptic or via the terminal:
sudo dpkg -r packagename
Example:
sudo dpkg -r pidgin
Note that the .deb package it creates can also be used elsewhere, which simplifies installation of the same program on many machines.
Use CheckInstall with auto-apt
You can use auto-apt when you want to build a simple package from source with checkinstall. You need to have auto-apt installed! Instead of
./configure
you use:
auto-apt run ./configure
If the dependencies are available, a dialog box opens and ask you to install them. The rest remains the same
make sudo checkinstall