Errors when trying to install 'semPlot' R package

421 Views Asked by At

I'm trying to install the package 'semPlot' in RStudio, and keep getting errors:

** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rockchalk' in library.dynam(lib, package, package.lib):
 DLL 'zip' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Documents/R/win-library/4.0/rockchalk'
Warning in install.packages :
  installation of package ‘rockchalk’ had non-zero exit status
ERROR: failed to lock directory 'C:/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Documents/R/win-library/4.0/00LOCK-OpenMx'
Warning in install.packages :
  installation of package ‘OpenMx’ had non-zero exit status
ERROR: dependencies 'rockchalk', 'OpenMx' are not available for package 'semPlot'
* removing 'C:/Documents/R/win-library/4.0/semPlot'
Warning in install.packages :
  installation of package ‘semPlot’ had non-zero exit status

The downloaded source packages are in
    ‘C:\AppData\Local\Temp\RtmpE9qK0s\downloaded_packages’

I already installed the package ‘rockchalk’, but it didn't help. The first time I tried to install 'semPlot' there was an almost endless process which also ended with an error.

2

There are 2 best solutions below

0
On

I solved it by uninstalling R and RStudio, and then installing them, and googling a small problem that came up with tydiverse.

3
On

You could use the install_github function to install R packages hosted on GitHub from the devtools package. Here is a reproducible example:

devtools::install_github('SachaEpskamp/semPlot')
library(semPlot)

Created on 2022-11-14 with reprex v2.0.2