1

I don't have root privileges on our servers but I would like to install tig. Downloading the source and running

./configure --prefix=$HOME/pkg

gives me

configure: error: ncurses not found

Okay, ncurses-devel isn't installed either. Installing ncurses works fine. But how do I tell the ./configure script now that ncurses is installed in my $HOME directory? Usually this works fine with something like

PKG_CONFIG_PATH=$HOME/pkg/include ./configure --prefix=$HOME/pkg
C_INCLUDE_PATH=$HOME/pkg/include/ncurses make

but for tig, this doesn't work, ./configure still throws the same error. How can I tell tig where to find ncurses?

Of course I can just skip this part in the ./configure step, but I then get these errors when making git:

/home/foo/pkg/include/ncurses/curses.h: In function ‘NCURSES_EXPORT_VAR’:
/home/foo/pkg/include/ncurses/curses.h:274: error: expected declaration specifiers before ‘acs_map’
  • why not just ask your system admin(s) to install tig for you? it's their job. tig is extremely unlikely to cause problems or conflicts with other programs on the system, so there's no really good reason for them to refuse. If company policy doesn't allow random software from the internet to be installed, you shouldn't be trying to get around that by installing in your home dir. Try to get the policy changed or an exception made for tig instead. – cas Nov 6 '15 at 1:06
  • I agree. But tig in the repositories is very old. Still, the administrator could install ncurses-devel, and then I could easily install tig. However, these are governmental servers and the bureaucratic overhead is huge. This always reminds me of youtube.com/watch?v=GI5kwSap9Ug so I prefer to struggle on the technical side, rather than not finding the form A38. – pfnuesel Nov 6 '15 at 1:12
2

You would do that by

./configure CFLAGS="-I$HOME/pkg/include" LIBS="-L$HOME/pkg/lib"

as you might see by running

./configure --help

(assuming that you installed ncurses in $HOME/pkg, as your question implies).

  • Then I get checking for C compiler default output file name... configure: error: in '/home/foo/pkg/install/tig': configure: error: C compiler cannot create executables See 'config.log' for more details.. I assume CFLAGS needs compiler flags, not path's? – pfnuesel Nov 6 '15 at 1:16
  • sorry (long day). – Thomas Dickey Nov 6 '15 at 1:17
  • Amazing, thank you so much! I should have learned this makefile language a long time ago! – pfnuesel Nov 6 '15 at 1:28
  • It's useful: you can reuse that little bit many times. – Thomas Dickey Nov 6 '15 at 1:40

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.