Как я могу установить пакет simmer в R? (На Ma c OS X) - PullRequest
0 голосов
/ 30 марта 2020

Версия ОС: macOS Catalina 10.15.4

Я попытался установить пакет simmer, но получил сообщения об ошибках от r studio.

'' '

> devtools::install_github("r-simmer/simmer")
Downloading GitHub repo r-simmer/simmer@master
✔  checking for file ‘/private/var/folders/pz/35d87wwn2_19t3h08hkv42m00000gn/T/RtmpaX72mc/remotes196b67508c78/r-simmer-simmer-e10a7dc/DESCRIPTION’ ...
─  preparing ‘simmer’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  installing the package to process help pages
         -----------------------------------
─  installing *source* package ‘simmer’ ...
   ** using staged installation
   ** libs
   clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DBOOST_NO_LONG_LONG -DBOOST_NO_AUTO_PTR -DRCPP_USE_UNWIND_PROTECT -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
   In file included from RcppExports.cpp:4:
   In file included from ./../inst/include/simmer.h:21:
   In file included from ../inst/include/simmer/common.h:32:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/container/set.hpp:15:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
   In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: C++ requires a type specifier for all declarations
   int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                   ^
   In file included from RcppExports.cpp:4:
   In file included from ./../inst/include/simmer.h:21:
   In file included from ../inst/include/simmer/common.h:32:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/container/set.hpp:15:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
   int      getsgroups_np(int *, uuid_t);
                                 ^
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
   typedef __darwin_uid_t        uid_t;
                                 ^
   In file included from RcppExports.cpp:4:
   In file included from ./../inst/include/simmer.h:21:
   In file included from ../inst/include/simmer/common.h:32:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/container/set.hpp:15:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
   int      getwgroups_np(int *, uuid_t);
                                 ^
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
   typedef __darwin_uid_t        uid_t;
                                 ^
   In file included from RcppExports.cpp:4:
   In file included from ./../inst/include/simmer.h:21:
   In file included from ../inst/include/simmer/common.h:32:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/container/set.hpp:15:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
   int      setsgroups_np(int, const uuid_t);
                                     ^
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
   typedef __darwin_uid_t        uid_t;
                                 ^
   In file included from RcppExports.cpp:4:
   In file included from ./../inst/include/simmer.h:21:
   In file included from ../inst/include/simmer/common.h:32:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/container/set.hpp:15:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
   In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
   int      setwgroups_np(int, const uuid_t);
                                     ^
   /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
   typedef __darwin_uid_t        uid_t;
                                 ^
   5 errors generated.
   make: *** [RcppExports.o] Error 1
   ERROR: compilation failed for package ‘simmer’
─  removing ‘/private/var/folders/pz/35d87wwn2_19t3h08hkv42m00000gn/T/Rtmp5agreT/Rinst19c0507f76cd/simmer’
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'simmer' from GitHub:
  System command error, exit status: 1, stdout + stderr (last 10 lines):
E>                                   ^
E> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
E> typedef __darwin_uid_t        uid_t;
E>                               ^
E> 5 errors generated.
E> make: *** [RcppExports.o] Error 1
E> ERROR: compilation failed for package ‘simmer’
E> * removing ‘/private/var/folders/pz/35d87wwn2_19t3h08hkv42m00000gn/T/Rtmp5agreT/Rinst19c0507f76cd/simmer’
E>       -----------------------------------
E> ERROR: package installation failed

'' '

Я нашел некоторую информацию от Google. Они сказали, что эта проблема возникает из-за macOS, но я не могу найти какие-либо решения. Есть ли другой способ установки пакета? или как я могу решить эту проблему?

1 Ответ

0 голосов
/ 31 марта 2020

Попробуйте просто

install.packages("simmer")
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...