non zero-exit status when installing a package from source from a different repository than "CRAN"

Hello everyone,
I would be very happy to get some advice on this issue!
Thank you in advance- if you need any further information, please let me know.

Error Information: install.packages(pkgs = "mip", repos = "https://...", type = "source") yields to:

Warning in install.packages :
installation of package ‘mip’ had non-zero exit status

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

Description of issue - Everytime I want to install a package from source I am getting a non-zero exit status. It seems like RStudio does not recognize RTools

Steps taken so far - I created an .Renviron file after the installation of RTools as described here: Using Rtools4 on Windows
-Sys.which("make") yields to "C:\rtools40\usr\bin\make.exe", as it is supposed to do
-I created a .rProfile file adding the repository
-getOption("repos") shows the CRAN and the added repos
-Installation via the windows console works fine, the problem only occurs when using RStudio

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 1.4.1717
  • OS Version: Windows 10 64 bit
  • R Version: 4-1.1

From Troubleshooting Guide: Using RStudio

Can you post a complete output message as example? We don't have enough information to help you out.

Here is the complete output message:

install.packages(pkgs = "mip", repos = "PIK-CRAN - repository status", type = "source")

trying URL 'https://rse.pik-potsdam.de/r/packages/src/contrib/mip_0.131.2.tar.gz'
Content type 'application/x-gzip' length 399471 bytes (390 KB)
downloaded 390 KB
Warning in install.packages :
installation of package ‘mip’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\johannah\AppData\Local\Temp\RtmpkxnWF7\downloaded_packages’

Sorry but I can't replicate your issue, the mip package compiles without problems for me on a similar setup (Windows 10, R 4.1.1, RStudio Desktop 1.4.1717). Are you running RStudio as "Administrator"?

No, usually I am running it from another account. But if I try to install the package whilst running it as an administrator, I am getting the exact same result..

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.