좋아, 여기에 나를 괴롭히는 것이 있습니다 … 소스에서 패키지를 빌드 checkinstall
하고 .deb 패키지를 생성하는 데 사용 하려고합니다. .deb 패키지를 만들고 싶지만 설치 하고 싶지는 않습니다 .
우분투 11.04에 있습니다. 먼저 feh
기본 리포지토리 에서 패키지를 설치 합니다. 버전 번호는 1.3.4.dfsg.1-3입니다.
그런 다음 feh
소스 에서 빌드하려고합니다 . 가지고 make
통과하고, 새로운 실행할 수있는 feh
명령 줄에서을; 화려한.
마지막으로 deb 패키지를 만들려면 다음 명령 줄을 사용합니다.
sudo checkinstall -D -y \
--install=no \
--fstrans=no \
--reset-uids=yes \
--pkgname=feh \
--pkgversion=2.7 \
--pkgrelease="tar.bz2" \
--arch=i386 \
--pkglicense=GPL \
--maintainer="Debian PhotoTools Maintainers <pkg-phototools-devel@lists.alioth.debian.org>" \
--pakdir=../.. \
--requires=libc6,libice6,libsm6,libx11-6,libxaw7,libxext6,libxmu6,libxt6,dpkg,install-info
알았어, 내가 --install=no
거기 사용 했어 ? 심지어 man checkinstall
말한다 :
–install 생성 된 패키지의 설치를 토글합니다.
이 checkinstall
명령이 응답 하는 것은 다음과 같습니다.
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
/usr/bin/checkinstall: eval: line 598: syntax error near unexpected token `newline'
/usr/bin/checkinstall: eval: line 598: `echo Debian PhotoTools Maintainers <pkg-phototools-devel@lists.alioth.debian.org>'
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@mypc ]
1 - Summary: [ Package created with checkinstall 1.6.2 ]
2 - Name: [ feh ]
3 - Version: [ 2.7 ]
4 - Release: [ tar.bz2 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ feh-2.7 ]
9 - Alternate source location: [ ]
10 - Requires: [ libc6,libice6,libsm6,libx11-6,libxaw7,libxext6,libxmu6,libxt6,dpkg,install-info ]
11 - Provides: [ feh ]
12 - Conflicts: [ ]
13 - Replaces: [ ]
Enter a number to change any of them or press ENTER to continue:
Installing with make install...
========================= Installation results ===========================
installing manuals to /usr/local/share/man
installing docs to /usr/local/share/doc/feh
installing executables to /usr/local/bin
installing fonts to /usr/local/share/feh/fonts
installing images to /usr/local/share/feh/images
installing examples to /usr/local/share/doc/feh/examples
======================== Installation successful ==========================
NOOOOOOOOOOOOOOOOO !!!!!!!!!!
나는 망할 패키지를 설치하지 않았다 – 내가 사용하는 이유는 THAT --install=no
LOUD 울고 아웃!
그리고 냉소적 인 시도에서 로그는 계속됩니다.
Copying documentation directory...
./
./TODO
./AUTHORS
./COPYING
./ChangeLog
./README
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
NOTE: The package will not be installed
이와 농담해야 ” 참고 : 패키지가 설치되지 않습니다 “, 오른쪽, 미스터을 checkinstall
? 물론입니다. 이 작업이 끝나면 내가 얻는 것을 주목하십시오.
$ apt-cache show feh | grep Version
Version: 1.10-1
$ feh --version
feh version 2.7
Compile-time switches: curl xinerama
$ which feh
/usr/local/bin/feh
어디에서 1.10-1
왔는지 확실하지 않습니다 (적어도 1.3.4
위와 같이 있어야 했습니까?).하지만 설치하지 말아야한다는 지시에도 불구하고 2.7 DID가 설치되어 있음이 분명합니다.
분명히, 나는 나중에 제거하려고 할 수 있습니다.
$ sudo dpkg -r feh
(Reading database ... 202193 files and directories currently installed.)
Removing feh ...
$ sudo dpkg --purge feh
(Reading database ... 202163 files and directories currently installed.)
Removing feh ...
Purging configuration files for feh ...
$ feh --version
feh version 2.7
Compile-time switches: curl xinerama
$ which feh
/usr/local/bin/feh
…하지만 dpkg --purge
작동 하지 않습니다 ( apt-get remove
수동으로 설치된 .deb 패키지이기 때문에 처음에는 작동하지 않습니다). 그리고 dpkg -r
버전을 제공하지 않는 것 외에도 (제거해야 할 것이 무엇인지 확실하지 않습니다) 실제로 피의 실행 파일을 제거하지 않았습니까?!
어떻게 얻을 수 – 수 있지만 누군가 여기에 무슨 일이 일어나고 있는지를 설명 checkinstall
하는 유일한 .deb 파일을 생성하고, 동시에 그것을 설치하지? 보너스 질문- 이 방법으로 설치된 실행 파일을 포함하여 모든 파일을 제거하는 방법은 /usr/local/bin/
분명히 dpkg -r
작동하지 않습니까?
답변
권리; 나는 무슨 일이 일어나고 있는지 마침내 이해했다고 생각합니다.
Installing with make install...
이것은 make install
2.7 소스 패키지 중 하나가 실행 되었다는 것을 의미합니다. 아마도 해당 파일의 최종 위치를 “보기”위해 새 .deb에 해당 위치를 씁니까? 그러나 어쨌든 새로운 2.7 .deb는 실제로 설치되지 않았으므로.로 제거 할 수 없었 dpkg -r
으며 실행 파일은 여전히 남아 dpkg -r
있습니다.
따라서 실행 후이 설치를 제거 checkinstall
하려면 실제로 소스 폴더 make uninstall
에서 호출해야 feh
합니다.
$ make uninstall
rm -f /usr/local/share/man/man1/feh.1 /usr/local/share/man/man1/feh-cam.1
rm -f /usr/local/share/man/man1/gen-cam-menu.1
rm -rf /usr/local/share/doc/feh
rm: cannot remove `/usr/local/share/doc/feh/TODO': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/keys': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/themes': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/examples/buttons': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/AUTHORS': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/ChangeLog': Permission denied
rm: cannot remove `/usr/local/share/doc/feh/README': Permission denied
make: *** [uninstall] Error 1
$ sudo make uninstall
rm -f /usr/local/share/man/man1/feh.1 /usr/local/share/man/man1/feh-cam.1
rm -f /usr/local/share/man/man1/gen-cam-menu.1
rm -rf /usr/local/share/doc/feh
rm -f /usr/local/bin/feh /usr/local/bin/feh-cam /usr/local/bin/gen-cam-menu
rm -rf /usr/local/share/feh/fonts
rm -rf /usr/local/share/feh/images
… 그리고 마지막으로 새로 만든 패키지를 사용해 볼 수 있습니다.
$ sudo dpkg -i feh_2.7-tar.bz2_i386.deb
Selecting previously deselected package feh.
(Reading database ... 202165 files and directories currently installed.)
Unpacking feh (from feh_2.7-tar.bz2_i386.deb) ...
Setting up feh (2.7-tar.bz2) ...
Processing triggers for man-db ...
$ feh --version
feh version 2.7
Compile-time switches: curl xinerama
$ sudo dpkg --purge feh
(Reading database ... 202198 files and directories currently installed.)
Removing feh ...
dpkg: warning: while removing feh, directory '/usr/local/share/doc' not empty so not removed.
Processing triggers for man-db ...
$ feh --version
bash: /usr/local/bin/feh: No such file or directory
# or in new terminal
$ feh --version
The program 'feh' is currently not installed. You can install it by typing:
sudo apt-get install feh
글쎄요 … 프로세스가 어떻게 진행되는지 정확히 이해했으면 좋겠습니다 ..
답변
checkinstall이 실제 파일 트리에 닿지 않도록 fstrans 를 yes 로 변경해야합니다
--fstrans=yes
답변
“두 번”을 설치할 수 있습니다 :
-
생성 한 패키지를 통해. 당신은 그것을 끌 수 있습니다
--install=no
-
제조사를 통해. 당신은 단순히 입력하여 해제 할 수 있습니다
make
(없이install
)
예 :
-
전혀 설치가 없습니다 :
sudo checkinstall --install=no make
-
make를 통한 설치 :
sudo checkinstall --install=no make install
답변
다음을 사용하십시오.
sudo checkinstall --install=no make -n install
답변
사용 : sudo checkinstall -D make -n install