user3494047
user3494047

Reputation: 1693

Installing devtools package fails

I am trying to install the package called devtools. I run the command: install.packages("devtools") or install.packages("devtools",dependencies = TRUE) and I get the same error:

Error: package or namespace load failed for ‘gert’:
 .onLoad failed in loadNamespace() for 'gert', details:
  call: NULL
  error: 'as_text' is not an exported object from 'namespace:sys'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/gert’
Warning in install.packages :
  installation of package ‘gert’ had non-zero exit status
ERROR: dependency ‘gert’ is not available for package ‘usethis’
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/usethis’
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
ERROR: dependency ‘usethis’ is not available for package ‘devtools’
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpj3P5T5/downloaded_packages’

I've tried running install.packages("gert") and i get error:

Error: package or namespace load failed for ‘gert’:
 .onLoad failed in loadNamespace() for 'gert', details:
  call: NULL
  error: 'as_text' is not an exported object from 'namespace:sys'
Error: loading failed
Execution halted

Anyone have any ideas?

Here is some systemInfo():

R version 3.5.2 (2018-12-20) Platform: x86_64-pc-linux-gnu (64-bit)

I've looked through similar questions where commenters/answerers suggested closing and opening Rstudio or restarting the R session. I have tried those and gotten back the same error.

Upvotes: 0

Views: 5550

Answers (3)

LCheng
LCheng

Reputation: 400

Adding one failure possibility for people to check:

I had the package installation fail out of a sudden. After many trials and errors, I realized that it was a simple line in the Description file. Also, the description section of the file needs to have 4 space tab when starting a new line.

Upvotes: 0

Nogayhan Seymen
Nogayhan Seymen

Reputation: 11

Installing libgit2 (as suggested here) worked for me.

There is also a conda package for it which works just as well, in case you don't have sudo rights.

Upvotes: 0

user3494047
user3494047

Reputation: 1693

Updating R to latest version worked.

Upvotes: 1

Related Questions