Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a 2-part question really. The first part is to try and find out why FPM isn't working, the second is to find out if FPM is the answer in the first place...

Background: I've patched some files in an open-source package which I want to repackage with a different name so that it can be installed beside the existing one (in case someone using it already has the main version installed - I don't want to overwrite it). I also want to use a deb so that I can manage dependencies and have people use apt-get to install it.

I did some googling and found that FPM seems to be the weapon of choice to build a .deb, but I can't get it to work. I installed version 0.4.29 and I'm running Ubuntu 12.04.

Heres what I have in my code directory (its the output of sudo make install):

     |_ sub_1
     |_ sub_2
        |_sub 3

And I'm trying to do this:

sudo fpm -s dir -t deb -n "my_package" -v 1.0 -C ~/code/main_folder/

But I get this:

No parameters given. You need to pass additional command arguments
so that I know what you want to build packages from. For example, 
for '-s dir' you would pass a list of files and directories. 
For '-s gem' you would pass a one or more gems to package from. 
As a full example, this will make an rpm of the 'json' rubygem: 
`fpm -s gem -t rpm json` {:level=>:warn}
Fix the above problems, and you'll be rolling packages in no time! {:level=>:fatal}

Clearly I have provided several parameters, so the error message is somewhat useless to me. I've tried a few different variations of this command, but nothing gives me a package. I'm wondering if its something simple and obvious, but I'm not really sure what to try next. Google shows me that this is a problem a lot of people seem to have with it, but I wasn't able to find any solutions... which makes me wonder if FPM is all its cracked up to be...

So if its not - is there another alternative to building .deb files? Its not a task I've done before...

Cheers in advance

PS: I wanted to add the tag 'fpm' to the question, but I don't have enough reputation. It seems like a sensible tag, so if someone who does have the reputation wants to add it then it might help others in the future.

share|improve this question
up vote 2 down vote accepted

The answer was very simple yet annoying. Apparently the -C changes fpm into the directory but even though I specified that I was packaging a directory it still needs to know what files to package up. I tried a *, which just resulted in an error... but a simple '.' on the end did the trick.

The working command (including a couple of dependencies as an example):

fpm -s dir -t deb -n my-package -v 1.0 -C /tmp/installdir/ -d pkgreqd -d libneedthis .
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.