[英]Compilation error when compiling rstudio-server?
I am trying to compile rstudio-server in Mac OS X 10.11.4 but I am getting some compilation error related to libboost.我正在尝试在 Mac OS X 10.11.4 中编译 rstudio-server 但我遇到了一些与 libboost 相关的编译错误。 Any pointers on how to troubleshoot this?
有关如何解决此问题的任何指示?
Note: I had previously installed boost with brew install boost
.注意:我之前使用
brew install boost
。
(The build output below is abbreviated) (下面的构建输出是缩写的)
sudo make install
gives this: sudo make install
给出了这个:
gwtc:
[java] Compiling module org.rstudio.studio.RStudio
[java] Compiling 4 permutations
[java] Compiling permutation 0...
[java] Process output
[java] Compiling
[java] Compiling permutation 1...
[java] Compiling
[java] Compiling permutation 2...
[java] Compiling permutation 3...
[java] Compile of permutations succeeded
[java] Compilation succeeded -- 217.782s
[java] Linking into Desktop/thingamabob/rstudio/src/gwt/www/rstudio; Writing extras to Desktop/thingamabob/rstudio/src/gwt/extras/rstudio
[java] Link succeeded
[java] Linking succeeded -- 4.739s
build:
BUILD SUCCESSFUL
Total time: 3 minutes 48 seconds
[ 19%] Built target gwt_build
[ 53%] Built target rstudio-core
[ 57%] Built target rstudio-core-hunspell
[ 58%] Built target rstudio-core-synctex
[ 59%] Built target rstudio-monitor
[ 59%] Built target rstudio-r
[ 59%] Built target rstudio-session-workers
[ 60%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionDependencies.cpp.o
[ 60%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionDiagnostics.cpp.o
[ 60%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionDirty.cpp.o
[ 61%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionErrors.cpp.o
etc...
[ 92%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionCrypto.cpp.o
[ 92%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/SessionModuleContext.mm.o
make[2]: *** No rule to make target `/opt/rstudio-tools/boost/boost_1_50_0/lib/libboost_date_time.a', needed by `src/cpp/session/rsession'. Stop.
make[1]: *** [src/cpp/session/CMakeFiles/rsession.dir/all] Error 2
make: *** [all] Error 2
Previous steps之前的步骤
cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=OSX
cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=OSX
install-dependencies-osx
(in folder rstudio/dependencies/osx
)install-dependencies-osx
(在文件夹rstudio/dependencies/osx
)修复了这些缺失的 depssudo make install
as described above.sudo make install
。These are the steps I just followed to get RStudio server up and running in OSX.这些是我刚刚在 OSX 中启动并运行 RStudio 服务器的步骤。
You can install them with brew:您可以使用 brew 安装它们:
brew install cmake
brew install ant
brew install openssl
The project will be cloned into a directory called rstudio
.该项目将被克隆到名为
rstudio
的目录中。 This will be ROOT below.这将是下面的 ROOT。
git clone https://github.com/rstudio/rstudio.git
This will install, among other things, the boost library in /opt.除其他外,这将在 /opt 中安装boost库。
cd rstudio/dependencies/osx
./install-dependencies-osx
(Check the value of ROOT above). (检查上面 ROOT 的值)。
cd ROOT
mkdir build
cd build
(check INSTALL file in ROOT directory for options). (检查 ROOT 目录中的 INSTALL 文件以获取选项)。
cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release
sudo make install
This will be used to run the rstudio server service.这将用于运行 rstudio 服务器服务。
sudo cp /usr/local/lib/rstudio-server/extras/launchd/com.rstudio.launchd.rserver.plist /Library/LaunchDaemon
NOTE: You can start the service using lanunchctl
but I couldn't find the proper way to do it.注意:您可以使用
lanunchctl
启动该服务,但我找不到正确的方法。 A workaround is to restart your system.解决方法是重新启动系统。
If you cannot log in with your user, it might be that it has a user id < 1000 (like in my case- to check the user id type id
in a shell and check the value of uid
at the beginning of the output).如果您无法使用您的用户登录,则可能是它的用户 ID < 1000(例如在我的情况下 - 在 shell 中检查用户 ID 类型
id
并检查输出开头的uid
值)。 Then you need to create a directory called rstudio in /etc然后你需要在 /etc 中创建一个名为rstudio的目录
cd /etc
mkdir rstudio
cd rstudio
Then create file named rserver.conf and add the following line, changing 100
by some value >100 and <=your user-id然后创建名为rserver.conf 的文件并添加以下行,将
100
更改为某个值 >100 和 <=your user-id
auth-minimum-user-id=101
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.