Beerus
Beerus

Reputation: 101

About Zelig Package and Library in R

I want to install the Zelig package and call the Zelig library. However, it has been removed from CRAN. I saw this post and tried to install the package. But when I call the library, it doesn't work. I attached my code and the output. Could someone help fix it?

> remotes::install_version("Zelig", "5.1.6")
  Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/Zelig/Zelig_5.1.6.tar.gz
  These packages have more recent versions available.
  It is recommended to update all of them.
  Which would you like to update?

  1: All                                 
  2: CRAN packages only                  
  3: None                                
  4: Rcpp     (1.0.13-1 -> 1.0.14) [CRAN]
  5: zoo      (1.8-12   -> 1.8-13) [CRAN]
  6: cli      (3.6.3    -> 3.6.4 ) [CRAN]
  7: rlang    (1.1.4    -> 1.1.5 ) [CRAN]
  8: cpp11    (0.5.0    -> 0.5.1 ) [CRAN]
  9: R6       (2.5.1    -> 2.6.1 ) [CRAN]
 10: pillar   (1.9.0    -> 1.10.1) [CRAN]
 11: purrr    (1.0.2    -> 1.0.4 ) [CRAN]
 12: doBy     (4.6.24   -> 4.6.25) [CRAN]
 13: lme4     (1.1-35.5 -> 1.1-36) [CRAN]
 14: quantreg (5.99     -> 6.00  ) [CRAN]
 15: jsonlite (1.8.9    -> 1.9.0 ) [CRAN]

 Enter one or more numbers, or an empty line to skip updates: 
 Installing 2 packages: VGAM, Amelia
 trying URL 'https://cran.rstudio.com/src/contrib/VGAM_1.1-13.tar.gz'
 Content type 'application/x-gzip' length 1710222 bytes (1.6 MB)
 ==================================================
 downloaded 1.6 MB

 trying URL 'https://cran.rstudio.com/src/contrib/Amelia_1.8.3.tar.gz'
 Content type 'application/x-gzip' length 1568806 bytes (1.5 MB)
 ==================================================
 downloaded 1.5 MB

 * installing *source* package ‘VGAM’ ...
 ** package ‘VGAM’ successfully unpacked and MD5 sums checked
 ** using staged installation
 ** libs
 using C compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
 sh: /opt/gfortran/bin/gfortran: No such file or directory
 using SDK: ‘’
 clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c VGAM_init.c -o VGAM_init.o
 clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c caqo3.c -o caqo3.o
 /opt/gfortran/bin/gfortran -arch arm64  -fPIC  -Wall -g -O2  -c ei.f -o ei.o
 make: /opt/gfortran/bin/gfortran: No such file or directory
 make: *** [ei.o] Error 1
 ERROR: compilation failed for package ‘VGAM’
 * removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/VGAM’
 * installing *source* package ‘Amelia’ ...
 ** package ‘Amelia’ successfully unpacked and MD5 sums checked
 ** using staged installation
 ** libs
 using C compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
 using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.6)’
 using SDK: ‘’
 clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c em.cpp -o em.o
 clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
 clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o Amelia.so em.o init.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
 ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found
 ld: warning: search path '/opt/gfortran/lib' not found
 ld: library 'gfortran' not found
 clang++: error: linker command failed with exit code 1 (use -v to see invocation)
 make: *** [Amelia.so] Error 1
 ERROR: compilation failed for package ‘Amelia’
 * removing ‘/Library/Frameworks/R.framework/Versions/4.4 arm64/Resources/library/Amelia’

 The downloaded source packages are in
‘/private/var/folders/bl/l7j8scv54tj5_1_yr8tj784w0000gn/T/RtmptDEsuS/downloaded_packages’
 ERROR: dependencies ‘Amelia’, ‘VGAM’ are not available for package ‘Zelig’
 * removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Zelig’


 > library(Zelig)
 Error in library(Zelig) : there is no package called ‘Zelig’

Upvotes: 0

Views: 53

Answers (0)

Related Questions