Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.packages error Ubuntu R4.2 #150

Open
HugoGit39 opened this issue May 17, 2023 · 5 comments
Open

install.packages error Ubuntu R4.2 #150

HugoGit39 opened this issue May 17, 2023 · 5 comments

Comments

@HugoGit39
Copy link

Hi

I am trying to install emayili on an Ubuntu server with R version 4.2 but i get below error, how come? On my Win R4.3 emayili works perfectly.

 install.packages("emayili")
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘triebeard’, ‘urltools’

trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/triebeard_0.4.1.tar.gz'
Content type 'binary/octet-stream' length 31206 bytes (30 KB)
==================================================
downloaded 30 KB

trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/urltools_1.7.3.tar.gz'
Content type 'application/x-tar' length 135608 bytes (132 KB)
==================================================
downloaded 132 KB

trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/emayili_0.7.15.tar.gz'
Content type 'binary/octet-stream' length 281040 bytes (274 KB)
==================================================
downloaded 274 KB

ERROR: failed to lock directory ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-triebeard’
Warning in install.packages :
  installation of package ‘triebeard’ had non-zero exit status
ERROR: dependency ‘triebeard’ is not available for package ‘urltools’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2/urltools’
Warning in install.packages :
  installation of package ‘urltools’ had non-zero exit status
ERROR: dependency ‘urltools’ is not available for package ‘emayili’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2/emayili’
Warning in install.packages :
  installation of package ‘emayili’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmpq00Shp/downloaded_packages’
@datawookie
Copy link
Owner

Hi @HugoGit39,

Firstly, this is not an {emayili} issue. It's a general R package installation issue.

Secondly, I am unable to reproduce the problem. Running the rocker/r-ver:4.2 Docker image (which is effectively R-4.2.3) I am able to install {emayili} and all of its dependencies.

Thirdly, did you read the error message that you posted? Specifically:

ERROR: failed to lock directory ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2’ for modifying
Try removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-triebeard’

Have you tried the suggestion?

Regards, Andrew.

@HugoGit39
Copy link
Author

Hi @datawookie

Yes Im aware that its not specifically a emayili issue :)...just trying to get some help.

I indeed have deleted the 00LOCK-triebeard folder...however when I try install emayili again...the installation kinda freezes at trybeard it seems:

Installing 'emayili' ...
[1/2] Installing urltools...
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘triebeard’

trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/triebeard_0.4.1.tar.gz'
Content type 'binary/octet-stream' length 31206 bytes (30 KB)
==================================================
downloaded 30 KB

trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/urltools_1.7.3.tar.gz'
Content type 'application/x-tar' length 135608 bytes (132 KB)
==================================================
downloaded 132 KB

* installing *source* package ‘triebeard’ ...
** package ‘triebeard’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/lib/R/site-library/Rcpp/include'   -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-asoVQd/r-base-4.2.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c RcppExports.cpp -o RcppExports.o

@HugoGit39
Copy link
Author

HugoGit39 commented May 18, 2023

Alright it worked but honestly no clue what went wrong. I got triebeard installed properly and removed the 00LOCK-triebeard folder. However when I wanted to install emayili ...it gave me below message

So I tried remotes::install_github("datawookie/emayili")....which worked :)

Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘emayili ’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

@datawookie
Copy link
Owner

Yes Im aware that its not specifically a emayili issue :)...just trying to get some help.

Understood. But placing an issue on a specific repository is not the best way to do that. Rather post a question on StackOverflow. Or just Google the error message. If you Google "ERROR: failed to lock directory" you'll get back a lot of useful and relevant results.

@datawookie
Copy link
Owner

WRT the error installing {emayili}, what CRAN repository are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants