2

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

Digol
  • 173
  • 10

1 Answers1

2

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
goldilocks
  • 60,325
  • 17
  • 117
  • 234