Rstudio server installation el capitan

2019-05-20 01:51发布

问题:

I used to run a rstudio server on my mac about a year ago. However, I didnt use it much so I deleted it. However, now I need to set it up again. In the meantime, I´ve changed to el capitan and the instructions on https://iangow.wordpress.com/2013/05/01/rstudio-server-on-mac-os-x/ is failing. Any idea what went wrong here? The output from the installation is as follows:

admins-macbook-pro-2:rstudio admin$ mkdir build
mkdir: build: File exists
admins-macbook-pro-2:rstudio admin$ cd build
admins-macbook-pro-2:build admin$ cmake -DRSTUDIO_TARGET=Server -DCMAKE_BUILD_TYPE=Release ..
-- Mac OS X version: 10.11
-- Boost version: 1.50.0
-- Found R: /Library/Frameworks/R.framework/Resources
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/admin/rstudio/build
admins-macbook-pro-2:build admin$ sudo launchctl unload /Library/LaunchDaemons/org.rstudio.launchd.rserver.plist
admins-macbook-pro-2:build admin$ sudo make install
Buildfile: /Users/admin/rstudio/src/gwt/build.xml

ext:
   [jscomp] None of the files changed. Compilation skipped.

javac:
    [javac] Compiling 1 source file to /Users/admin/rstudio/src/gwt/bin

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 -- 329.680s
     [java] Linking into /Users/admin/rstudio/src/gwt/www/rstudio; Writing extras to /Users/admin/rstudio/src/gwt/extras/rstudio
     [java]    Link succeeded
     [java]    Linking succeeded -- 7.419s

build:

BUILD SUCCESSFUL
Total time: 5 minutes 46 seconds
[  0%] Built target gwt_build
[  1%] Building CXX object src/cpp/core/CMakeFiles/rstudio-core.dir/http/SocketProxy.cpp.o
In file included from /Users/admin/rstudio/src/cpp/core/http/SocketProxy.cpp:22:
In file included from /Users/admin/rstudio/src/cpp/core/include/core/http/BoostAsioSsl.hpp:24:
In file included from /opt/rstudio-tools/boost/boost_1_50_0/include/boost/asio/ssl/context.hpp:26:
In file included from /opt/rstudio-tools/boost/boost_1_50_0/include/boost/asio/ssl/context_base.hpp:20:
/opt/rstudio-tools/boost/boost_1_50_0/include/boost/asio/ssl/detail/openssl_types.hpp:19:10: fatal error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
1 error generated.
make[2]: *** [src/cpp/core/CMakeFiles/rstudio-core.dir/http/SocketProxy.cpp.o] Error 1
make[1]: *** [src/cpp/core/CMakeFiles/rstudio-core.dir/all] Error 2
make: *** [all] Error 2

回答1:

With El Capitan, OS X has moved the system OpenSSL headers out of the way and so they are no longer automatically discovered by RStudio.

This is currently worked around by looking for OpenSSL here: https://github.com/rstudio/rstudio/blob/cc562d2c0c4ceac1cf3131e27097d1d1249ba889/src/cpp/core/CMakeLists.txt#L190-L205

To take advantage of this, you'll need to install OpenSSL yourself to /usr/local/opt/openssl; if you're using Homebrew then a simple

brew install openssl

will do this automatically for you. (You may need to run cmake again, after making this change, to ensure all the compilation configuration is updated.)