【问题标题】:Compilation error when compiling rstudio-server?编译rstudio-server时出现编译错误?
【发布时间】:2023-04-11 07:18:01
【问题描述】:

我正在尝试在 Mac OS X 10.11.4 中编译 rstudio-server,但我遇到了一些与 libboost 相关的编译错误。有关如何解决此问题的任何指示?

注意:我之前使用 brew install boost 安装了 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 存储库 (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 中)修复了这些缺失的部门
  5. 现在配置成功了,我只是按照上面的描述运行了sudo make install

【问题讨论】:

  • make install 之前您遵循了哪些步骤?你安装依赖了吗?您是否按照安装文件中的说明运行了cmake
  • 是的,是的。请在帖子末尾查看我最近的编辑。
  • 好的,谢谢。我已经从 OSX 10.11.x 和现在的 10.12.x 中的 github repos 安装了 rstudio。我记得一开始有一些问题,但不确定是 libboost。不幸的是,直到星期二才能检查我的电脑。一件事,错误是在/opt/rstudio-tools/ 中寻找提升。它应该在哪里? brew 安装在哪里? (也有brew-只是不记得安装的细节...)。
  • 我发现这个链接可能是相关/有用的(参见最后一篇提到 /opt/rstudio-tools 的帖子):support.rstudio.com/hc/en-us/community/posts/…
  • 谢谢!我将尝试使用 rstudio 安装脚本安装 boost 并删除 brew 的版本。

标签: r rstudio rstudio-server


【解决方案1】:

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

安装依赖项

  • XCode(或命令行工具)
  • R 来自here
  • JDK 来自here
  • 安装 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 id 并检查 uid 的值输出的开始)。然后你需要在 /etc

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

然后创建名为 rserver.conf 的文件并添加以下行,将 100 更改为 >100 和

auth-minimum-user-id=101

【讨论】:

  • 感谢您的详尽回答;你能告诉我你是否有这个文件/opt/rstudio-tools/boost/boost_1_50_0/lib/libboost_date_time.a
  • 是的。不是吗?运行install-dependencies-osx 时是否看到任何错误?这是在 /opt 中安装 boost 的步骤(我自己看到很多警告,但没有错误,所以我认为它安装正常)。
  • 这很奇怪。即使install-dependencies-osx 确实安装了相应的部门,包括boost,我也没有它。但是,没有安装该特定文件......我现在正在尝试不同的路线,即通过 brew install rstudio-server 安装 rstudio-server。
  • 我明白了。您使用的是 Apple 的编译器,还是有可能使用其他编译器进行编译?祝您酿造尝试好运!
  • @ddiez:我可以在 osx 上成功安装 rstudio 服务器(从 rstudio 服务器网站下载时 CMakeList.txt 文件存在一些问题,但您的 git 链接版本运行良好!)但是当我输入 rstudio-服务器验证安装,它说 rstudio-server: command not found 即使在我重新启动后。有什么线索吗?
猜你喜欢
  • 1970-01-01
  • 2014-11-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多