저는 CentOS와 RPM에 대한 경험이 부족해서 뭔가 분명한 것이 빠졌을 수도 있지만 알아낼 수 없는 것 같습니다... 여기 지침을 사용하여 Docker 이미지의 CentOS 6에 Sphinx를 설치하려고 합니다. http://sphinxsearch.com/docs/current/installing-redhat.html (단, 바이너리가 아닌 소스 RPM에서 설치를 시도했습니다)
docker run -i -t centos:centos6 bash
실행하기 위해 CentOS 이미지를 실행한 후 명령을 실행하려고 시도했을 때 얻은 결과는 다음과 같습니다(추가 정보를 제공하고 프롬프트를 건너뛰는 것과 약간 다른 지침).
[root@db60006ae258 /]# yum -y install postgresql-libs unixODBC
Loaded plugins: fastestmirror
Setting up Install Process
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:37
extras | 3.4 kB 00:00
extras/primary_db | 34 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.3 MB 00:08
Resolving Dependencies
--> Running transaction check
---> Package postgresql-libs.x86_64 0:8.4.20-4.el6_7 will be installed
---> Package unixODBC.x86_64 0:2.2.14-14.el6 will be installed
--> Processing Dependency: libltdl.so.7()(64bit) for package: unixODBC-2.2.14-14.el6.x86_64
--> Running transaction check
---> Package libtool-ltdl.x86_64 0:2.2.6-15.5.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================
Installing:
postgresql-libs x86_64 8.4.20-4.el6_7 updates 202 k
unixODBC x86_64 2.2.14-14.el6 base 378 k
Installing for dependencies:
libtool-ltdl x86_64 2.2.6-15.5.el6 base 44 k
Transaction Summary
==========================================================================================================================================
Install 3 Package(s)
Total download size: 624 k
Installed size: 1.8 M
Downloading Packages:
(1/3): libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm | 44 kB 00:00
(2/3): postgresql-libs-8.4.20-4.el6_7.x86_64.rpm | 202 kB 00:00
(3/3): unixODBC-2.2.14-14.el6.x86_64.rpm | 378 kB 00:01
------------------------------------------------------------------------------------------------------------------------------------------
Total 234 kB/s | 624 kB 00:02
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]>
Package: centos-release-6-7.el6.centos.12.3.x86_64 (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libtool-ltdl-2.2.6-15.5.el6.x86_64 1/3
Installing : unixODBC-2.2.14-14.el6.x86_64 2/3
Installing : postgresql-libs-8.4.20-4.el6_7.x86_64 3/3
Verifying : postgresql-libs-8.4.20-4.el6_7.x86_64 1/3
Verifying : unixODBC-2.2.14-14.el6.x86_64 2/3
Verifying : libtool-ltdl-2.2.6-15.5.el6.x86_64 3/3
Installed:
postgresql-libs.x86_64 0:8.4.20-4.el6_7 unixODBC.x86_64 0:2.2.14-14.el6
Dependency Installed:
libtool-ltdl.x86_64 0:2.2.6-15.5.el6
Complete!
[root@db60006ae258 /]# rpm -Uhvv http://sphinxsearch.com/files/sphinx-2.2.10-1.rhel6.src.rpm
Retrieving http://sphinxsearch.com/files/sphinx-2.2.10-1.rhel6.src.rpm
D: ============== /var/tmp/rpm-tmp.Knfx7x
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening db environment /var/lib/rpm cdb:mpool:joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 155 Header sanity check: OK
D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: Expected size: 4201741 = lead(96)+sigs(180)+pad(4)+data(4201461)
D: Actual size: 4201741
D: /var/tmp/rpm-tmp.Knfx7x: Header SHA1 digest: OK (f86024cbd050d0758ddb1aa0fc73c246deeb2f90)
D: added source package [0]
D: found 1 source and 0 binary packages
D: Expected size: 4201741 = lead(96)+sigs(180)+pad(4)+data(4201461)
D: Actual size: 4201741
D: InstallSourcePackage at: psm.c:244: Header SHA1 digest: OK (f86024cbd050d0758ddb1aa0fc73c246deeb2f90)
D: created directory(s) /root/rpmbuild mode 0755
D: created directory(s) /root/rpmbuild/SOURCES mode 0755
D: created directory(s) /root/rpmbuild/SPECS mode 0755
1:sphinx D: ========== Directories not explicitly included in package:
D: 0 /root/rpmbuild/SOURCES/
D: 1 /root/rpmbuild/SPECS/
D: ==========
warning: user builder does not exist - using root
warning: group builder does not exist - using root
D: fini 100644 1 ( 0, 0) 288 /root/rpmbuild/SOURCES/config.patch;56a3c57f unknown
warning: user builder does not exist - using root
warning: group builder does not exist - using root
D: fini 100664 1 ( 0, 0) 129584 /root/rpmbuild/SOURCES/libstemmer_c.tgz;56a3c57f unknown
warning: user builder does not exist - using root
warning: group builder does not exist - using root
D: fini 100664 1 ( 0, 0) 1064388 /root/rpmbuild/SOURCES/re2.tar.gz;56a3c57f unknown
warning: user builder does not exist - using root
warning: group builder does not exist - using root
########################################### [100%]
D: fini 100644 1 ( 0, 0) 3109250 /root/rpmbuild/SOURCES/sphinx-2.2.10-release.tar.gz;56a3c57f unknown
warning: user builder does not exist - using root
warning: group builder does not exist - using root
D: fini 100644 1 ( 0, 0) 2048 /root/rpmbuild/SOURCES/sphinx.init;56a3c57f unknown
warning: user builder does not exist - using root
warning: group builder does not exist - using root
D: fini 100644 1 ( 0, 0) 9647 /root/rpmbuild/SPECS/sphinx_rel22.spec;56a3c57f unknown
GZDIO: 527 reads, 4316100 total bytes in 0.021979 secs
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm
[root@db60006ae258 /]# service searchd start
bash: service: command not found
[root@db60006ae258 /]# find / -name "searchd*"
[root@db60006ae258 /]#
답변1
소스 RPM(src.rpm)은 RPM 형식을 사용하여 패키지된 소스 코드입니다. 이를 사용하여 컴퓨터용 바이너리 패키지를 빌드하거나 사용자 정의 빌드의 시작점으로 사용할 수 있습니다. 소스 RPM은 바이너리 RPM보다 이식성이 뛰어나지만 지식이 많지 않은 이상 이 경로를 사용하지 않는 것이 좋습니다.
CentOS 페이지를 확인하여 시스템에 사용할 수 있는 공식 또는 바이너리 패키지가 있는지 확인하세요.검토된 타사 저장소 중 하나에서. 의심스러운 타사 리포지토리 중 일부는 핵심 패키지를 덮어쓰고 시스템을 손상시킬 수 있습니다(또는 업데이트를 어렵게 만들 수 있음).