Each time I run pkgload::load_all()
, I get the message below.
> pkgload::load_all()
ℹ Loading my_package
ℹ The packages "dm" and "sf" are required.
✖ Would you like to install them?
1: Yes
2: No
After each restart of RStudio, I need to reinstall "dm" and "sf" using "renv" by inserting 1
in the console. And then "sf" will be installed from source.
How could I solve this?
I ran devtools::install_dev_deps()
. Now I only have the message, but nothing will be installed if I choose the option 1: Yes.
> pkgload::load_all()
ℹ Loading my_package
ℹ The packages "dm" and "sf" are required.
✖ Would you like to install them?
1: Yes
2: No
Selection: 1
>
> devtools::load_all()
ℹ Loading my_package
ℹ The packages "dm" and "sf" are required.
✖ Would you like to install them?
1: Yes
2: No
Selection: 1
> renv::restore()
* The library is already synchronized with the lockfile.
> renv::install('dm')
Installing dm [1.0.4] ...
OK [linked cache]
> devtools::load_all()
ℹ Loading my_package
ℹ The packages "dm" and "sf" are required.
✖ Would you like to install them?
1: Yes
2: No
Selection: 1
>
I get the following error when I load the dm or sf packages:
> library(dm)
Error: package or namespace load failed for ‘dm’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/user_name/Library/Application Support/renv/cache/v5/R-4.3/x86_64-apple-darwin20/igraph/1.4.1/a7ef0d811cb66d8be9da0d7b5ab80ded/igraph/libs/igraph.so':
dlopen(/Users/user_name/Library/Application Support/renv/cache/v5/R-4.3/x86_64-apple-darwin20/igraph/1.4.1/a7ef0d811cb66d8be9da0d7b5ab80ded/igraph/libs/igraph.so, 0x0006): Library not loaded: /osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib
Reason: tried: '/osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib' (no such file), '/osxcross/bin/../x86_64-
> library(sf)
Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/user_name/Library/Application Support/renv/cache/v5/R-4.3/x86_64-apple-darwin20/KernSmooth/2.23-20/8dcfa99b14c296bc9f1fd64d52fd3ce7/KernSmooth/libs/KernSmooth.so':
dlopen(/Users/user_name/Library/Application Support/renv/cache/v5/R-4.3/x86_64-apple-darwin20/KernSmooth/2.23-20/8dcfa99b14c296bc9f1fd64d52fd3ce7/KernSmooth/libs/KernSmooth.so, 0x0006): Library not loaded: /osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib
Reason: tried: '/osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/osxcross/bin/../x86_64-apple-darwin22/lib/libgfortran.5.dylib'