데비안 checkinstall은 install = no를 무시합니다; 패키지를 빌드하지만 자동 설치하지 않는 방법은 무엇입니까?


14

좋아, 여기에 나를 괴롭히는 것이 있습니다 ... 소스에서 패키지를 빌드 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=noLOUD 울고 아웃!

그리고 냉소적 인 시도에서 로그는 계속됩니다.

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작동하지 않습니까?


의아해 바이너리 꾸러미가 있다면 왜 소스에서 설치하겠습니까?
— Faheem Mitha

--maintainer에 대한 오류를 어떻게 수정 했습니까?
— 물병 자리 힘

checkinstall sources RE : --maintainer error를 살펴 보았습니다. 인용되지 않은 <및> 기호의 결과입니다. 따라서 쉬운 대답은 다음과 같습니다. 기호를 사용하지 마십시오. 더 문제가되는 답은 checkinstall에 심각한 문제가 있다는 것입니다. 전체 소스는 eval echo $1... 로 가득 합니다 eval "echo '$1'". 실제로 여야 합니다. 저자 나 그와 연락을 취하려고 노력할 것입니다.
— Six

답변:


13

권리; 나는 무슨 일이 일어나고 있는지 마침내 이해했다고 생각합니다.

Installing with make install...

이것은 make install2.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

글쎄요 ... 프로세스가 어떻게 진행되는지 정확히 이해했으면 좋겠습니다 ..



4

"두 번"을 설치할 수 있습니다 :

  1. 생성 한 패키지를 통해. 당신은 그것을 끌 수 있습니다--install=no

  2. 제조사를 통해. 당신은 단순히 입력하여 해제 할 수 있습니다 make(없이 install)

예 :

  • 전혀 설치가 없습니다 :

    sudo checkinstall --install=no make

  • make를 통한 설치 :

    sudo checkinstall --install=no make install


이것이 가장 좋은 대답이라고 생각합니다.
— jgomo3

1
"sudo checkinstall --install = no --fstrans = yes make"가 저에게 효과적이었습니다. 나는이 답변을 이것과 섞었습니다
— Teo

-1

다음을 사용하십시오.

sudo checkinstall --install=no make -n install

-1

사용 : sudo checkinstall -D make -n install


답을 설명하십시오.
— vonbrand

1
make -n installmake실제로 파일 설치를 중단 하지만 checkinstall결과를 올바르게 해석하지 못합니다. 필요한 모든 파일을 포함하지 않은 deb 파일로 끝납니다. 따라서 이것은 작동하지 않습니다.
— Tim Tisdall
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.