1

I am trying to load RSQLite in my R installation using Home-brew on a Mac OS Catalina with no success.

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin19.3.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RSQLite)
Error: package or namespace load failed for ‘RSQLite’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/3.6/site-library/RSQLite/libs/RSQLite.so':
  dlopen(/usr/local/lib/R/3.6/site-library/RSQLite/libs/RSQLite.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libR.dylib
  Referenced from: /usr/local/lib/R/3.6/site-library/RSQLite/libs/RSQLite.so
  Reason: image not found

The issue is, the RSQLite.so file seems to be there:

rll307@Rodrigos-iMac RSQLite % ls /usr/local/lib/R/3.6/site-library/RSQLite/libs/RSQLite.so
-rwxr-xr-x  1   2096184 Apr  4 08:52 /usr/local/lib/R/3.6/site-library/RSQLite/libs/RSQLite.so*

I downloaded RSQLite_2.2.0.tar binary from CRAN and installed manually

Update

I uninstalled RSQLite and encountered the following error as I tried to install it again:


> install.packages("RSQLite")
Installing package into ‘/usr/local/lib/R/3.6/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RSQLite_2.2.0.tar.gz'
Content type 'application/x-gzip' length 2373785 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

* installing *source* package ‘RSQLite’ ...
** package ‘RSQLite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.6.3_1/lib/R/include" -DNDEBUG -I. -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -I"/usr/local/lib/R/3.6/site-library/BH/include" -I"/usr/local/lib/R/3.6/site-library/plogr/include" -I"/usr/local/lib/R/3.6/site-library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -fPIC  -g -O2  -c DbColumn.cpp -o DbColumn.o
In file included from DbColumn.cpp:1:
In file included from ./pch.h:1:
In file included from ./RSQLite.h:14:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/container/stable_vector.hpp:23:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config.hpp:57:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /usr/local/lib/R/3.6/site-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: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from DbColumn.cpp:1:
In file included from ./pch.h:1:
In file included from ./RSQLite.h:14:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/container/stable_vector.hpp:23:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config.hpp:57:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /usr/local/lib/R/3.6/site-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 DbColumn.cpp:1:
In file included from ./pch.h:1:
In file included from ./RSQLite.h:14:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/container/stable_vector.hpp:23:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config.hpp:57:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /usr/local/lib/R/3.6/site-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 DbColumn.cpp:1:
In file included from ./pch.h:1:
In file included from ./RSQLite.h:14:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/container/stable_vector.hpp:23:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config.hpp:57:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /usr/local/lib/R/3.6/site-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 DbColumn.cpp:1:
In file included from ./pch.h:1:
In file included from ./RSQLite.h:14:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/container/stable_vector.hpp:23:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config.hpp:57:
In file included from /usr/local/lib/R/3.6/site-library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /usr/local/lib/R/3.6/site-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: *** [DbColumn.o] Error 1
ERROR: compilation failed for package ‘RSQLite’
* removing ‘/usr/local/lib/R/3.6/site-library/RSQLite’
Warning in install.packages :
  installation of package ‘RSQLite’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/l3/g7br_rgx7m965vn322wtxky00000gn/T/RtmptnBNRO/downloaded_packages’

Thanks for the help

RodLL
  • 110
  • 8

0 Answers0