Open Nathan-Mather opened 4 years ago
Same here! Is your question solved?
I think it's an issue with R's C++17 compiler (in Windows). It works under R4.0.0.
On Fri, Aug 14, 2020 at 4:48 AM yijunwang0805 notifications@github.com wrote:
Same here! Is your question solved?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xuyiqing/fastplm/issues/12#issuecomment-674036545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2PKGAJOUQB4EREVQCFK5LSAUQCJANCNFSM4KD4JDPQ .
-- Yiqing Xu
Assistant Professor Department of Political Science Stanford University http://yiqingxu.org/
I believe when installing this package, users will encounter the following issues.
1) Connection issue
错误: Failed to install 'unknown package' from GitHub:
schannel: failed to receive handshake, SSL/TLS connection failed
This could be solved by hitting ctrl enter multiple times and restarting the R session.
2) Dependency package updates
Downloading GitHub repo xuyiqing/fastplm@master
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: ps (1.3.3 -> 1.3.4 ) [CRAN]
5: RcppArmad... (0.9.900.1.0 -> 0.9.900.2.0) [CRAN]
Enter one or more numbers, or an empty line to skip updates:1
ps (1.3.3 -> 1.3.4 ) [CRAN]
RcppArmad... (0.9.900.1.0 -> 0.9.900.2.0) [CRAN]
Installing 2 packages: ps, RcppArmadillo
Installing packages into ‘C:/Users/Administrator/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
试开URL’https://cran.rstudio.com/bin/windows/contrib/4.0/ps_1.3.4.zip'
Content type 'application/zip' length 701541 bytes (685 KB)
downloaded 685 KB
试开URL’https://cran.rstudio.com/bin/windows/contrib/4.0/RcppArmadillo_0.9.900.2.0.zip'
Content type 'application/zip' length 2657521 bytes (2.5 MB)
downloaded 2.5 MB
package ‘ps’ successfully unpacked and MD5 sums checked
错误: Failed to install 'fastplm' from GitHub:
(由警告转换成)cannot remove prior installation of package ‘ps’
So it won't automatically update the package. I need to manually update each of them, which fastplm depends on.
> install.packages("ps")
Installing package into ‘C:/Users/Administrator/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
试开URL’https://cran.rstudio.com/bin/windows/contrib/4.0/ps_1.3.4.zip'
Content type 'application/zip' length 701541 bytes (685 KB)
downloaded 685 KB
package ‘ps’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Administrator\AppData\Local\Temp\RtmpeUjpWc\downloaded_packages
> install.packages("RcppArmadillo")
Installing package into ‘C:/Users/Administrator/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
试开URL’https://cran.rstudio.com/bin/windows/contrib/4.0/RcppArmadillo_0.9.900.2.0.zip'
Content type 'application/zip' length 2657521 bytes (2.5 MB)
downloaded 2.5 MB
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Administrator\AppData\Local\Temp\RtmpeUjpWc\downloaded_packages
> devtools::install_github('xuyiqing/fastplm')
Downloading GitHub repo xuyiqing/fastplm@master
√ checking for file 'C:\Users\Administrator\AppData\Local\Temp\RtmpeUjpWc\remotes26147d9b55d6\xuyiqing-fastplm-a48dc15/DESCRIPTION' (442ms)
- preparing 'fastplm':
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'fastplm_1.0.7.tar.gz'
Installing package into ‘C:/Users/Administrator/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'fastplm' ...
** using staged installation
** libs
etc...
Finally, after again and again,
** testing if installed package keeps a record of temporary installation path
* DONE (fastplm)
Bravo, problem solved! Happy face!
For those who have encountered the same problems, I hope this could help.
Following this: https://travis-ci.community/t/error-in-shlib-internal-args-c-17-standard-requested-but-cxx17-is-not-defined/6748/4, running the following lines before installation fixed the CXX17 error for me:
mkdir -p ~/.R
echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars
echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars
In Centos platform, the string should be
CXX11 = g++
CXX14 = g++
CXX17 = g++
CXX17STD = -std=c++17
Following this: https://travis-ci.community/t/error-in-shlib-internal-args-c-17-standard-requested-but-cxx17-is-not-defined/6748/4, running the following lines before installation fixed the CXX17 error for me:
mkdir -p ~/.R echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars
I encountered the same error and I was trying to use this. However, this is what appears in my console:
mkdir -p ~/.R Error: unexpected '/' in "mkdir -p ~/" echo 'CXX17 = g++-7 -std=gnu++17 -fPIC' > ~/.R/Makevars Error: unexpected string constant in "echo 'CXX17 = g++-7 -std=gnu++17 -fPIC'"
I get the following error code when I try to install this package:
Error in .shlib_internal(args) : C++17 standard requested but CXX17 is not defined
My understanding is I need a C++17 compiler. I tried updating Rcpp to the latest version but this did not help. I am running on windows. Any advice is appreciated.
Thanks