编译rstudio-server时编译错误?

时间:2016-10-07 11:58:09

标签: r rstudio rstudio-server

我正在尝试在Mac OS X 10.11.4中编译rstudio-server但是我收到了一些与libboost相关的编译错误。有关如何排除故障的任何指示?

注意:我之前使用brew install boost安装了提升。

(下面的构建输出缩写)

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

之前的步骤

  1. 我克隆了github repo(https://github.com/rstudio/rstudio
  2. 创建了构建目录
  3. cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=OSX
  4. 通过运行脚本install-dependencies-osx(在文件夹rstudio/dependencies/osx中)修复了那些缺失的deps
  5. 现在配置成功了,我只是如上所述运行了sudo make install

1 个答案:

答案 0 :(得分:1)

这些是我在OSX中启动并运行RStudio服务器时所遵循的步骤。

安装依赖项

  • XCode(或命令行工具)
  • 来自here的R。
  • 来自here的JDK。
  • 安装cmake,ant和openssl。

您可以使用brew安装它们:

brew install cmake

brew install ant

brew install openssl
  • 克隆rstudio github存储库。

项目将被克隆到名为rstudio的目录中。这将是下面的ROOT。

git clone https://github.com/rstudio/rstudio.git
  • 安装RStudio依赖项

除其他外,这将在/ opt。

中安装 boost
cd rstudio/dependencies/osx
./install-dependencies-osx

构建RStudio服务器

  • 创建构建目录

(检查上面ROOT的值)。

cd ROOT
mkdir build
cd build
  • 配置

(检查ROOT目录中的INSTALL文件以获取选项)。

cmake .. -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release
sudo make install

配置系统:

  • 将launchd文件复制到/ Library / LaunchDaemon

这将用于运行rstudio服务器服务。

sudo cp /usr/local/lib/rstudio-server/extras/launchd/com.rstudio.launchd.rserver.plist /Library/LaunchDaemon

注意:您可以使用lanunchctl启动服务,但我无法找到正确的方法。解决方法是重新启动系统。

  • 设置RStudio接受的最小用户ID

如果您无法使用您的用户登录,则可能是因为它具有用户ID< 1000(在我的情况下 - 检查shell中的用户ID类型id并检查输出开头的uid的值)。然后,您需要在/ etc

中创建一个名为 rstudio 的目录
cd /etc
mkdir rstudio
cd rstudio

然后创建名为 rserver.conf 的文件并添加以下行,将100更改为某个值> 100且< =您的用户ID

auth-minimum-user-id=101