“rpmbuild -bb package.spec”产生错误:包已存在:%package debuginfo

时间:2012-04-13 20:15:16

标签: centos rpm rpmbuild

当我在centos上运行命令rpmbuild -bb mypackage.spec时,我收到错误

error: Package already exists: %package debuginfo

以下是规范文件的一部分:

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires: gcc = 4.1.2
BuildRequires: make >= 3.81
BuildRequires: postgresql84-devel = 8.4.9

%description
ElementalCORE 

%prep
%setup -qn pcore

%build
%{__make}

%install
mkdir -p %{_tmppath}/%{name}-%{version}-%{release}
mkdir -p %{name}
mkdir -p %{_bindir}
install -d %{name}
#This is to ensure that the BuildRoot will be created fresh during the %install section. 
#mkdir -p %{buildroot}
#install -p -m 0755 $RPM_BUILD_ROOT/%{name}/obj/ggsnc/ggsnc %{_bindir}

%clean

%files
%defattr(-,root,root)
%doc NEWS

1 个答案:

答案 0 :(得分:3)

问题是评论中的%install。将其替换为%_install