个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:CheckInstall}}
 
{{Languages|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.
 
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.
 
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.
 
 
== Warning! ==
 
== Warning! ==
 
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 CheckInstall (for instance, using Ctrl+C). Please have a [[UbuntuHelp:LiveCD]] ready for recovery, or be sure you can access the recovery mode, before using CheckInstall. If this problem happens to you, you will need to use the following command as root to reset the correct permissions.
 
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 CheckInstall (for instance, using Ctrl+C). Please have a [[UbuntuHelp:LiveCD]] ready for recovery, or be sure you can access the recovery mode, before using CheckInstall. If this problem happens to you, you will need to use the following command as root to reset the correct permissions.
第10行: 第8行:
 
chmod 755 /
 
chmod 755 /
 
</nowiki></pre>
 
</nowiki></pre>
 
 
You may want to run checkinstall with the command line
 
You may want to run checkinstall with the command line
 
<pre><nowiki>
 
<pre><nowiki>
第16行: 第13行:
 
</nowiki></pre>
 
</nowiki></pre>
 
without using <code><nowiki>sudo</nowiki></code>, to avoid the problem, and then install the generated Debian package manually.
 
without using <code><nowiki>sudo</nowiki></code>, to avoid the problem, and then install the generated Debian package manually.
 
 
See [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/45763 bug #45763] for more information.
 
See [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/45763 bug #45763] for more information.
 
 
== Installation ==
 
== Installation ==
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo aptitude install checkinstall
 
sudo aptitude install checkinstall
 
</nowiki></pre>
 
</nowiki></pre>
 
 
== Usage ==
 
== Usage ==
 
Instead of <code><nowiki>sudo make install</nowiki></code> you will use <code><nowiki>sudo checkinstall</nowiki></code>
 
Instead of <code><nowiki>sudo make install</nowiki></code> you will use <code><nowiki>sudo checkinstall</nowiki></code>
 
 
The installed package can then also easily be removed via <code><nowiki>synaptic</nowiki></code>
 
The installed package can then also easily be removed via <code><nowiki>synaptic</nowiki></code>
 
or
 
or
第32行: 第25行:
 
sudo dpkg -r packagename
 
sudo dpkg -r packagename
 
</nowiki></pre>
 
</nowiki></pre>
 
 
== Use CheckInstall with auto-apt ==
 
== 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
 
<pre><nowiki>
 
<pre><nowiki>
 
./configure
 
./configure
 
</nowiki></pre>
 
</nowiki></pre>
 
 
you use:
 
you use:
 
<pre><nowiki>
 
<pre><nowiki>
 
auto-apt run ./configure
 
auto-apt run ./configure
 
</nowiki></pre>
 
</nowiki></pre>
 
 
If the dependencies are available, a dialog box opens and ask you to install them.
 
If the dependencies are available, a dialog box opens and ask you to install them.
 
 
The rest remains the same
 
The rest remains the same
 
<pre><nowiki>
 
<pre><nowiki>
第53行: 第41行:
 
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:
 
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:
 
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
 
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
 
 
Credits: [http://forum.ubuntu-fr.org/viewtopic.php?id=1328 Ubuntu-fr.org]
 
Credits: [http://forum.ubuntu-fr.org/viewtopic.php?id=1328 Ubuntu-fr.org]
 
----
 
----

2007年11月30日 (五) 16:28的版本


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.

Warning!

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 CheckInstall (for instance, using Ctrl+C). Please have a UbuntuHelp:LiveCD ready for recovery, or be sure you can access the recovery mode, before using CheckInstall. If this problem happens to you, you will need to use the following command as root to reset the correct permissions.

chmod 755 /

You may want to run checkinstall with the command line

checkinstall --install=no

without using sudo, to avoid the problem, and then install the generated Debian package manually. See bug #45763 for more information.

Installation

sudo aptitude install checkinstall

Usage

Instead of sudo make install you will use sudo checkinstall The installed package can then also easily be removed via synaptic or

sudo dpkg -r packagename

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

IconsPage?action=AttachFile&do=get&target=IconWarning3.png Blog Rabais reported some troubles: 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 Credits: Ubuntu-fr.org