2017-04-03 17 views
0

저는 rpmbuild + spec 파일을 처음 사용하고 "hello world"예제를 만들기 위해 다음을 시도했습니다 : tutorial.rpmbuild install dependency

관리가 제대로 작동하려면 관리해야하지만 종속성/작동 방법을 배우고 싶습니다. 따라서 다른 "hello world 2"예제를 복제하고 아래 spec 파일의 첫 번째 파일에 종속 관계로 연결하려고했습니다.

그러나 아래 오류가 계속 발생합니다. yum 설치시 helloworld1을 설치하고 yum 설치시 자동으로 설치하는 방법이 있습니까?

나에게 어떤 사례가 있습니까?

SPEC 파일

Name:   helloworld2 
Version:  2.0 
Release:  1%{?dist} 
Summary:  A hello world program 

License:  GPLv3+ 
URL:   https://blog.packagecloud.io 
Source0:  helloworld2-2.0.tar.gz 

#BuildRequires: helloworld1 
Requires(preun): helloworld1 
#PreReq: testYW 

%description 
A helloworld program from the packagecloud.io blog! 

%prep 
%setup 

%build 
make PREFIX=/usr %{?_smp_mflags} 

%install 
make PREFIX=/usr DESTDIR=%{?buildroot} install 
echo %{?buildroot} 

%clean 
rm -rf %{buildroot} 

%files 
%{_bindir}/helloworld2 

ERORR

COMMAND >> 얌/x86_64에/helloworld2-2.0-1.el6.x86_64.rpm

Loaded plugins: product-id, search-disabled-repos, security, subscription-manager 
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 
Setting up Install Process 
Examining RPMS/x86_64/helloworld2-2.0-1.el6.x86_64.rpm: helloworld2-2.0-1.el6.x86_64 
Marking RPMS/x86_64/helloworld2-2.0-1.el6.x86_64.rpm to be installed 
Resolving Dependencies 
--> Running transaction check 
---> Package helloworld2.x86_64 0:2.0-1.el6 will be installed 
--> Processing Dependency: helloworld1 for package: helloworld2-2.0-1.el6.x86_64 
--> Finished Dependency Resolution 
Error: Package: helloworld2-2.0-1.el6.x86_64 (/helloworld2-2.0-1.el6.x86_64) 
      Requires: helloworld1 
You could try using --skip-broken to work around the problem 

답변

1

보낸 RPMS 설치 helloworld2에는 helloworld1이 필요합니다. 먼저 helloworld1을 설치해야합니다. 둘 다 함께 설치하십시오. helloworld2는 helloworld1에 의존하기 때문에; 먼저 helloworld1을 설치하지 않고 (또는 동시에) 그를 설치할 수 없습니다.

0

오케이! 나는 대답을 얻었다! 내가 냠을 할 수 있습니다

그것이 자신의 의존성 할 것 * .rpm을을 설치

다른

저장소에 모든 새로운 RPM 파일을 넣고 그것을 :)

그것을 데리러