当我在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
最佳答案
问题是注释中的%install
。将其替换为%_install
。
关于centos - “rpmbuild -bb package.spec”产生错误:软件包已存在:%package debuginfo,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10147720/