1

I'm trying to build the boost libraries

as i see at the manual from,

http://www.boost.org/doc/libs/1_62_0/more/getting_started/unix-variants.html#easy-build-and-install

As described at the manual, I'm running the command,

$ ./bootstrap.sh --prefix=path/to/installation/prefix

with --prefix=~/boost-libs, like this,

$ ./bootstrap.sh --prefix=~/boost-libs

so the libs to be placed in my home directory.

After that I'm running,

./b2 install

I'm also tried to run it like this,

./b2 install --prefix=~/boost-libs

But nothing to be placed at 'boost-libs' in my home folder.

  • The folder 'boost-libs' is exists in my home folder.

I also tried to run,

$ sudo ./bootstrap.sh

and then

$ sudo ./b2 install

so the installation will go to '/usr/local/lib', and it does work, but not succeeded to install to a custom directory.

Thanks

underscore_d
  • 6,309
  • 3
  • 38
  • 64
beginer1
  • 51
  • 1
  • 4
  • _"But nothing to be placed at 'boost-libs' in my home folder."_ Where **is** it placed? Does the output of `install` show anything about what it does? Does anything change if you replace `~` with `$HOME`? – underscore_d Jan 11 '18 at 13:20
  • Possible duplicate of [Difference between $HOME and '~' (tilde)?](https://stackoverflow.com/questions/11587343/difference-between-home-and-tilde) because your `~` is not at the start of its word (which is the `-` of the switch), so it shouldn't get expanded by the shell, so that command should just end up installing to a folder called `~` in your current working directory. – underscore_d Jan 11 '18 at 13:31
  • Thanks. I tried with $HOME like this, ./b2 install --prefix=$HOME/boost-libs; and it run OK. @underscore_d – beginer1 Jan 11 '18 at 13:39

1 Answers1

4

As mentioned in the comments above,

Running it using $HOME instead of '~/' solved the problem,

./bootstrap.sh --prefix=$HOME/boost-libs

Thanks

For more details about $HOME and '~/' at that link,

Difference between $HOME and '~' (tilde)?

beginer1
  • 51
  • 1
  • 4