将Boost库安装到〜(home)中的自定义目录 [英] Installing Boost libraries to a custom directory in ~ (home)
问题描述
我正在尝试构建增强库
如我在手册中所见
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
带有--prefix =〜/boost-libs,
with --prefix=~/boost-libs, like this,
$ ./bootstrap.sh --prefix=~/boost-libs
因此将这些库放在我的主目录中.
so the libs to be placed in my home directory.
在我跑步之后,
./b2 install
我也试图像这样运行它,
I'm also tried to run it like this,
./b2 install --prefix=~/boost-libs
但是我的主文件夹中的"boost-libs"中没有任何内容.
But nothing to be placed at 'boost-libs' in my home folder.
- 我的主文件夹中存在文件夹"boost-libs".
我也试图跑步,
$ sudo ./bootstrap.sh
然后
$ sudo ./b2 install
因此安装将转到"/usr/local/lib",并且起作用, 但未成功安装到自定义目录.
so the installation will go to '/usr/local/lib', and it does work, but not succeeded to install to a custom directory.
谢谢
推荐答案
如上所述,
使用$ HOME而不是'〜/'运行它可以解决问题,
Running it using $HOME instead of '~/' solved the problem,
./bootstrap.sh --prefix=$HOME/boost-libs
谢谢
有关该链接中$ HOME和'〜/'的更多详细信息,
For more details about $HOME and '~/' at that link,
这篇关于将Boost库安装到〜(home)中的自定义目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!