datawookie / emayili

An R package for sending email messages.
https://datawookie.github.io/emayili/
179 stars 27 forks source link

install.packages error Ubuntu R4.2 #150

Open HugoGit39 opened 1 year ago

HugoGit39 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 emayiliagain...the installation kinda freezes at trybeardit 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 commented 1 year ago

Alright it worked but honestly no clue what went wrong. I got triebeardinstalled 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 commented 1 year ago

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 commented 1 year ago

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