Thanks for replying. Unfortunately, no one of your suggestions worked.
Doing
`install.packages("semPlot", dependencies=TRUE)`
then I run library(semPlot), and it gives me back the same error.
Then,
update.packages(checkBuilt=TRUE)
Saying "Yes" to all updates and Yes to "Do you want to install from sources the packages which need compilation? (Yes/no/cancel)"
Then:
.....clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘qgraph’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/qgraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/qgraph’
* installing *source* package ‘sp’ ...
** package ‘sp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c Rcentroid.c -o Rcentroid.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from Rcentroid.c:28:
In file included from ./sp.h:13:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
^~~~~~~~~~
1 error generated.
make: *** [Rcentroid.o] Error 1
ERROR: compilation failed for package ‘sp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp’
The downloaded source packages are in
‘/private/var/folders/8n/gpg02l1x2q70kspllm78xvqm0000gp/T/RtmpleWzt4/downloaded_packages’
Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘qgraph’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘sp’ had non-zero exit status
> library(semPlot)
Error: package or namespace load failed for ‘semPlot’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
object 'vI' not found
So the problem is not solved. Any other solutions?