Cannot install R package from GitHub/ CRAN

I have R-4.1, Rstudio 1.4.1106 and Rtools 40v2 installed on my win-OS

I am trying to install landmap package from GitHub

The package does not install, here are the steps I followed

First from GitHub

devtools::install_github("envirometrix/landmap")

Downloading GitHub repo envirometrix/landmap@HEAD
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: fansi (0.4.2 -> 0.5.0) [CRAN]
5: stringi (1.6.1 -> 1.6.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
fansi (0.4.2 -> 0.5.0) [CRAN]
stringi (1.6.1 -> 1.6.2) [CRAN]
Installing 2 packages: fansi, string
Installing packages into ‘C:/Users/shalzsab/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

There are binary versions available but the source versions are later:
binary source needs_compilation
fansi 0.4.2 0.5.0 TRUE
stringi 1.6.1 1.6.2 TRUE

installing the source packages ‘fansi’, ‘stringi’

Here, it asks me "Do you want to install from sources the packages which need compilation? If I click on Yes! The packages are downloaded but fail to install

The downloaded source packages are in
‘C:\Users\shalzsab\AppData\Local\Temp\RtmpiW1Trb\downloaded_packages’

Now, If I type no to, Do you want to install from sources the packages which need compilation?
Both, fansi and string are installed but landmap does not get installed

fansi (0.4.2 -> 0.5.0) [CRAN]
stringi (1.6.1 -> 1.6.2) [CRAN]
Installing 2 packages: fansi, stringi
Installing packages into ‘C:/Users/shalzsab/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

There are binary versions available but the source versions are later:
binary source needs_compilation
fansi 0.4.2 0.5.0 TRUE
stringi 1.6.1 1.6.2 TRUE

package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\shalzsab\AppData\Local\Temp\RtmpiW1Trb\downloaded_packages

I also tried to install landmap package from CRAN

install.packages("landmap")

Installing package into ‘C:/Users/shalzsab/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
landmap 0.0.9 0.0.11 FALSE

installing the source package ‘landmap’

The downloaded source packages are in
‘C:\Users\shalzsab\AppData\Local\Temp\RtmpiW1Trb\downloaded_packages’

The package downloads but does not install.
How to fix this problem.

Can you show the error message you get?

install.packages("fansi")

Are you sure you don't need specific packages to activate what you need? Have you downloaded the devotools package?

Here, again if I click Yes for Compilation, the package gets downloaded but does not install

>Installing package into ‘C:/Users/shalzsab/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

 There is a binary version available but the source version is later:
      binary source needs_compilation
fansi  0.4.2  0.5.0              TRUE

installing the source package ‘fansi’

trying URL 'https://cran.rstudio.com/src/contrib/fansi_0.5.0.tar.gz'
Content type 'application/x-gzip' length 301724 bytes (294 KB)
downloaded 294 KB

Do you want to install from sources the packages which need compilation?  Yes

The downloaded source packages are in
	‘C:\Users\shalzsab\AppData\Local\Temp\RtmpyAOgfZ\downloaded_packages’

I already have devtools installed.

Are you sure that the version of R is compatible with the package landmap?

Yes, it is compatible with R (≥ 3.5.0)

I tried again to install landmap from GitHub, This time it is showing me this error

The downloaded source packages are in
‘C:\Users\shalzsab\AppData\Local\Temp\RtmpGE3Rbr\downloaded_packages’
Error: Failed to install 'landmap' from GitHub:
System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty
In addition: Warning message:
In i.p(...) : installation of package ‘stringi’ had non-zero exit status

What is this error about?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.