Fpm: // , Missing requirement: Need executable 'rpmbuild' to convert dir to rpm {:level=>:error}

Created on 3 Sep 2015  路  5Comments  路  Source: jordansissel/fpm

// , Shouldn't the README mention the need for rpmbuild, or for the Debian equivalent, for building .rpm or .deb` files?

This might seem obvious, but it stumped me for a few minutes, at least:

$ sudo yum install rpmbuild                                                            [ruby-2.2.3]
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: fedora.mirrors.pair.com
 * extras: centos.mirror.constant.com
 * updates: mirror.es.its.nyu.edu
No package rpmbuild available.
Error: Nothing to do
[~/shared]$ sudo yum search rpmbuild                                                             [ruby-2.2.3]
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: fedora.mirrors.pair.com
 * extras: centos.mirror.constant.com
 * updates: mirror.es.its.nyu.edu
============================================ N/S matched: rpmbuild ============================================
drupal7-rpmbuild.noarch : Rpmbuild files for drupal7
perl-macros.x86_64 : Macros for rpmbuild

  Name and summary matches only, use "search all" for everything.

Perhaps I'm assuming too low of a common denominator among my fellow developers, but this does seem like it's worth mentioning in the README, at least.

P.S. Whoever is doing the dirty work to keep the tests and niggly weirder parts of FPM going, you have my silent appreciation. It's saved me many an hour.

Most helpful comment

Have the same issue on Ubuntu, seems that the docs are invalid since it needs package "rpm" too on Ubunu/Deb:

sudo apt-get install rpm

All 5 comments

i think package is named rpm-build

ps, what's with the "//" everywhere you write?

As @glensc says, the package is called rpm-build and is documented in the CentOS and Fedora packaging guidelines. I think the mistake here is assuming FPM reimplements everything. As much as we'd like to be native Ruby (see projects like arr-pm), it isn't feasible so often we fall back to the regular tools and wrap them in a consistent way. The error message and tests are pretty clear on what's going on here so while FPM doesn't expect you to know what's required on target systems, it does expect your local system to be properly setup. People tend to use the tools they're comfortable with so I think this is a fair expectation.

Thanks for the feedback on tests, we could always write more but it's good to see the effort we've put into them being appreciated :smile:

Have the same issue on Ubuntu, seems that the docs are invalid since it needs package "rpm" too on Ubunu/Deb:

sudo apt-get install rpm

For macOS:

brew install rpm

yum provides */rpmbuild

would give you a list of the packages that provide any file named rpmbuild..
This is just for information purposes

yum search rpm

could have also been of help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fatmcgav picture fatmcgav  路  10Comments

FlorinAndrei picture FlorinAndrei  路  7Comments

lancerinf picture lancerinf  路  5Comments

jean-christophe-manciot picture jean-christophe-manciot  路  4Comments

hellosputnik picture hellosputnik  路  4Comments