I want to install RRDTOOL, there are some builds needed to be installed first as specified here.

While trying to install every build in bash with a set of commands like these :

wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz gunzip -c pkg-config-0.23.tar.gz | tar xf - cd pkg-config-0.23 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" $MAKE $MAKE install

I get the following message error after $MAKE install :

install: missing file operand Try 'install --help' for more information

How to make this right ?

Edit : I attached shell log this time with the chnges "$MAKE"-> "make" and "$MAKE install"->"make install", It's seems not working:

pi@raspberrypi:/tmp/rrdbuild/libxml2-2.6.32 $ make install Making install in include make[1]: Entering directory '/tmp/rrdbuild/libxml2-2.6.32/include' Making install in libxml make[2]: Entering directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' make[3]: Entering directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' make install-exec-hook make[4]: Entering directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' /bin/bash ../../mkinstalldirs /opt/rrdtool-1.6.0/include/libxml2/libxml mkdir -p -- /opt/rrdtool-1.6.0/include/libxml2/libxml mkdir: cannot create directory ‘/opt/rrdtool-1.6.0’: Permission denied Makefile:562: recipe for target 'install-exec-hook' failed make[4]: *** [install-exec-hook] Error 1 make[4]: Leaving directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' Makefile:512: recipe for target 'install-exec-am' failed make[3]: *** [install-exec-am] Error 2 make[3]: Leaving directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' Makefile:471: recipe for target 'install-am' failed make[2]: *** [install-am] Error 2 make[2]: Leaving directory '/tmp/rrdbuild/libxml2-2.6.32/include/libxml' Makefile:322: recipe for target 'install-recursive' failed make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory '/tmp/rrdbuild/libxml2-2.6.32/include' Makefile:1075: recipe for target 'install-recursive' failed make: *** [install-recursive] Error 1


POSIX shells such as bash use $ as a unary operator to substitute the value of a named variable. A gotcha with variables is they don't have to have been declared in any particular context; you won't get an error for referring to $whatever even if a variable called whatever hasn't been previously declared or defined. It's just considered undefined. So typing:

> $MAKE install

is the same as typing

> $whatever install

Which, presuming $MAKE and $whatever aren't defined, this is the same as just:

> install

Which, by coincidence, is a GNU coreutils command (i.e., standard on the system). It operates on files (see man install if you care) so

install: missing file operand

is the output (an error message).

The command you were intended to use here is actually make. The reason $MAKE was used instead is sometimes people will have this defined to expand to the name of something that will fulfill the function of make. This is a bit esoteric, because it really assumes you know something about makefiles, which are generally written using variables with specific conventional names to refer to generic tools. In the context of executing a makefile, make has some of them predefined, including $MAKE, and whoever wrote that presumably thinks you will recognize that.

Which is pretty presumptuous, since it probably isn't defined in most people's environment. Anyway, what you should be doing is:

> make
> make install
  • I added shell lines to the question. I did as you said and understood that. but still I think I don't get the things done right. Is it the right way to install RRDTOOL? as the link I provided at the first sentence of my question guides?
    – Digol
    Nov 3 '16 at 21:34
  • You now have permissions issues due to the destination path of the install. Either change the permissions of directory into which you want to install, or use sudo make install.
    – goldilocks
    Nov 3 '16 at 22:32
  • Yes i just got it. Now do I need to go back all the steps in the manual again ? Or there is something the make this "make install" quicker for each build?
    – Digol
    Nov 3 '16 at 22:42
  • If it was installed into a custom location where there isn't anything else, it's probably split into bin and lib directories and such. In that case you can just archive that and copy it to another pi, it should work as long as the same prequisites are installed.
    – goldilocks
    Nov 4 '16 at 11:40
  • Ok thanks your answer worked! Still having struggle to instal RRDTOOL but it is not for this question.
    – Digol
    Nov 4 '16 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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