Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"rpmbuild -bb package.spec" produces error: Package already exists: %package debuginfo

When i run the command rpmbuild -bb mypackage.spec, on centos, i get an error

error: Package already exists: %package debuginfo

following is part of the spec file:

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
like image 610
kamal Avatar asked Oct 28 '25 02:10

kamal


1 Answers

The problem is the %install in the comment. Replace it with %_install.

like image 172
Mike McQuaid Avatar answered Oct 31 '25 12:10

Mike McQuaid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!