I need to install this package from github: https://github.com/vrai/fdspatch It is said to run on linux but it does not say specifically how to install. Can anyone tell me what commands I need to run? Here is what I've tried:

sudo git clone https://github.com/vrai/fdspatch.git
cd /bin
make -j8
sudo make install


sudo git clone https://github.com/vrai/fdspatch
cd /home/pi/fdspatch
make -j8

Then I get this error:

/usr/bin/ld: /tmp/ccS4xtJx.o: in function `action_convert':
fdspatch.c:(.text+0x7d0): warning: the use of `tempnam' is dangerous, better use `mkstemp'
  • I think you can get better help by asking on a different SE, such as Unix.SE or StackOverflow. This does't seem to be specific to the Raspberry Pi.
    – Aloha
    Commented Jan 28, 2021 at 5:04

4 Answers 4


The answers already provided do include all the necessary steps, just not in a single answer, so here goes (assumes you have already installed Git, which seems to be the case based on your question):

git clone https://github.com/vrai/fdspatch
cd fdspatch

This will report the warning about tempnam that you are already aware of, as stated elsewhere, this is a warning, not an error; the program will still run.

Let's prove the binary you have just built works, from the same fdspatch directory run:


As we didn't provide any of the expected parameters, this will show the help file of the tool. If you're happy only being able to run this command from the fdspatch directory, there's no further action needed.

If you want to be able to run the fdspatch command from anywhere, you'll need to copy it to the systems binary directory (this IS documented on the project's github page, but the details are left to the reader...)

Assuming you're on the latest Raspberry Pi OS, this should work (again, assumes you are still in the fdspatch directory):

sudo cp fdspatch /usr/local/bin

You can then run the fdspatch command anywhere on the system.

All of the above has been tested and and shown to work on a RPi4 on latest Raspberryb Pi OS.

  • "copy it to the systems binary directory" -> The canonical place for this is /usr/local/sbin (also fine: /usr/local/bin). You should then check that is in the default $PATH: echo $PATH | grep local.
    – goldilocks
    Commented Jan 26, 2021 at 20:55
  • Rather than sudo cp I would suggest using sudo install --mode 0755 fdspatch --target-directory /usr/local/bin, which allows you to explicitly set the file's mode and make it executable.
    – berto
    Commented Jan 28, 2021 at 13:30

The readme provides the instructions for installing this:

To build fdspatch on a Unix style system (including Linux and OS X), simply run make. This will produce the fdspatch binary that can be copied to the system's standard binary directory if required.

  • sorry for being a total noob, but can you put the exact terminal commands in your answer I've tried running make but it doesn't seem to work.
    Commented Jan 16, 2021 at 14:48
  • I'm afraid I haven't used fdspatch so I don't know what might be the problem. I suggest adding what the make command output to your question, maybe someone else will be able to help. Commented Jan 16, 2021 at 15:03

You'll need to install git first as it's not a standard package:

$ sudo apt-get update 
$ sudo apt-get upgrade
$ sudo apt-get install git

Once git is installed, and you know the GitHub URL:

$ git clone https://github.com/vrai/fdspatch

This will download all the necessary files and folders to your system.

This next step is strictly optional, but I keep all of my repos in a folder under /home/pi/git-repos. And so, I cd before cloning:

$ mkdir ~/git-repos 
$ cd git-repos
$ git clone https://github.com/vrai/fdspatch

That's it! From there your repo should have some instructions on what needs to be done next (e.g. if compilation is needed to build from source). Know that not everything on github needs to be compiled; for example the bash scripts at https://github.com/seamusdemora/RonR-RPi-image-utils

Also know this: the only thing simple about git is the name. It's a complex set of tools, and you will need to invest time to develop any proficiency. That said, it's not particularly difficult to get started. There are many guides on the Internet of course, and lots of good Q&A on Stack Overflow SE. And man git is quite useful, but deep.

  • The repo does not have instructions to install,I ran "make" but it did not install
    Commented Jan 15, 2021 at 21:15
  • @UNKNOWN: Most github repos have an "Issues" tab. I'd suggest you peruse any existing issues; if yours is not addressed already, you can start a new one. Note this repo is looking a bit "stale" as it's 7 years since anything was updated.
    – Seamus
    Commented Jan 15, 2021 at 22:43
  • It's been seven years since the the package was updated, I don't think I would get an answer.
    Commented Jan 16, 2021 at 14:49

The Makefile in that repo has no install: running make gets you a binary file (fdspatch) which you can then manually copy to /usr/local/bin, /home/pi/bin or any other place where you keep binary files.

The "error" you got is not an error, it's a warning. This program uses an old function, tempnam, which returns a valid filename, and such that a file with this name did not exist when tempnam checked. Obviously, this can lead to situations where two programs running simultaneously (or a single program which simultaneously needs two temporary files) will call tempnam and end up picking the same name. Naturally, one of them will fail to create the file because the other one already did, and now the file cannot be created because it already exists.

Unless you plan to run multiple copies of old programs using this function, this is not an issue you should care about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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