个人工具

“UbuntuHelp:CheckInstall”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的10个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/CheckInstall}}
 
{{From|https://help.ubuntu.com/community/CheckInstall}}
 
{{Languages|UbuntuHelp:CheckInstall}}
 
{{Languages|UbuntuHelp:CheckInstall}}
[[UbuntuHelp:CheckInstall|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.
+
== Introduction ==
https://help.ubuntu.com/community/[[UbuntuHelp:[[UbuntuHelp:IconsPage|IconsPage]]?|IconsPage]]??action=AttachFile&do=get&target=IconTip.png Use [[UbuntuHelp:CheckInstall|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.
+
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.
== Warning! ==
+
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.
[[UbuntuHelp:CheckInstall|CheckInstall]] occasionally sets incorrect access permissions for your root directory (''/''), resulting in the inability to execute most commands or perform most operations on the system. This seems to happen if you interrupt [[UbuntuHelp:CheckInstall|CheckInstall]] (for instance, using Ctrl+C). Please have a [[UbuntuHelp:LiveCD|LiveCD]] ready for recovery, or be sure you can access the recovery mode, before using [[UbuntuHelp:CheckInstall|CheckInstall]]. If this problem happens to you, you will need to use the following command as root to reset the correct permissions.
+
(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>
chmod 755 /
+
sudo aptitude install checkinstall
 
</nowiki></pre>
 
</nowiki></pre>
You may want to run checkinstall with the command line
+
== Usage ==
 +
Instead of
 
<pre><nowiki>
 
<pre><nowiki>
checkinstall --install=no
+
sudo make install
 +
</nowiki></pre> you will use
 +
<pre><nowiki>
 +
sudo checkinstall
 
</nowiki></pre>
 
</nowiki></pre>
without using <code><nowiki>sudo</nowiki></code>, to avoid the problem, and then install the generated Debian package manually.
+
When called with no arguments, checkinstall will call "make install". If you need other arguments, they can be supplied:
See [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/45763 bug #45763] for more information.
+
== Installation ==
+
 
<pre><nowiki>
 
<pre><nowiki>
sudo aptitude install checkinstall
+
sudo checkinstall make install_package
 
</nowiki></pre>
 
</nowiki></pre>
== Usage ==
+
The installed package can then also easily be removed via [[UbuntuHelp:SynapticHowto#head-9a2bcc5a697205e980d6b8b3cac02f799e1bd5f0| Synaptic]]
Instead of <code><nowiki>sudo make install</nowiki></code> you will use <code><nowiki>sudo checkinstall</nowiki></code>
+
or via the terminal:
The installed package can then also easily be removed via <code><nowiki>synaptic</nowiki></code>
+
or
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo dpkg -r packagename
 
sudo dpkg -r packagename
 
</nowiki></pre>
 
</nowiki></pre>
== Use [[UbuntuHelp:CheckInstall|CheckInstall]] with auto-apt ==
+
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>
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconWarning3.png [http://nawer.sanspub.org/dotclear/index.php?2005/07/19/66-installation-a-partir-des-sources Blog Rabais] reported some troubles:
+
== Related Links ==
He tested it with Swftools which has several dependencies. avi2swf didn't compile correctly and he had to remove all avifile dependencies manually to remove avi2swf from the compilation
+
* [[UbuntuHelp:SynapticHowto|SynapticHowto]]
Credits: [http://forum.ubuntu-fr.org/viewtopic.php?id=1328 Ubuntu-fr.org]
+
* [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]
 +
* [[UbuntuHelp:CompilingSoftware|CompilingSoftware]]
 +
* [[UbuntuWiki:PackagingGuide/Complete|Packaging|Guide]]
 +
* [http://www.asic-linux.com.mx/~izto/checkinstall/ The checkinstall web site]
 
----
 
----
[[category:CategoryDocumentation]]
+
[[category:CategorySoftware]] [[category:CategoryCommandLine]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 21:52的最新版本


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. 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.) 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 Packaging|Guide. IconsPage?action=AttachFile&do=get&target=warning.png 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

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

Related Links