steno-aarhus / legliv

UK Biobank Project
0 stars 0 forks source link

Error when running pak::pak() #31

Closed nielsbock closed 2 weeks ago

nielsbock commented 2 weeks ago

@lwjohnst86 running pak::pak() today causes this error:

> pak::pak()
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
✔ Loading metadata database ... done                                          

→ Will install 20 packages.
→ Will download 21 packages with unknown size.
+ bigD            0.2.0       [dl]
+ bitops          1.0-7       [dl]
+ broom.helpers   1.15.0      [dl]
+ ggconsort       0.1.0       [bld][cmp][dl] (GitHub: b0a879a)
+ ggtext          0.1.2       [dl]
+ gridtext        0.1.5       [dl]
+ gt              0.10.1.9000 [bld][cmp][dl] (GitHub: fd0c99c)
+ gtsummary       1.7.2.9001  [bld][cmp][dl] (GitHub: 30ef717)
+ jpeg            0.1-10      [dl] + ✔ libjpeg-dev
+ juicyjuice      0.1.0       [dl]
+ labelled        2.13.0      [dl]
+ markdown        1.13        [dl]
+ png             0.1-8       [dl] + ✔ libpng-dev
+ reactable       0.4.4       [dl]
+ reactR          0.5.0       [dl]
+ urltools        1.7.3       [dl]
+ viridis         0.6.5       [dl]
+ webshot2        0.1.1       [dl]
+ websocket       1.4.1       [dl] + ✔ make, ✔ libssl-dev
+ xtable          1.8-4       [dl]
✔ All system requirements are already installed.

ℹ Getting 20 pkgs with unknown sizes
✔ Cached copy of ggconsort 0.1.0 (source) is the latest build
✔ Cached copy of gt 0.10.1.9000 (source) is the latest build
✔ Cached copy of gtsummary 1.7.2.9001 (source) is the latest build
✔ Got urltools 1.7.3 (x86_64-pc-linux-gnu-ubuntu-20.04) (135.61 kB)                                 
✔ Cached copy of viridis 0.6.5 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build               
✔ Cached copy of webshot2 0.1.1 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                              
✔ Cached copy of jpeg 0.1-10 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                  
✔ Cached copy of gridtext 0.1.5 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                               
✔ Cached copy of png 0.1-8 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                    
✔ Cached copy of juicyjuice 0.1.0 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                        
✔ Cached copy of labelled 2.13.0 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                         
✔ Cached copy of reactable 0.4.4 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                        
✔ Cached copy of xtable 1.8-4 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                               
✔ Cached copy of bigD 0.2.0 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                                 
✔ Cached copy of ggtext 0.1.2 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                              
✔ Cached copy of bitops 1.0-7 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                             
✔ Cached copy of websocket 1.4.1 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build             
✔ Cached copy of reactR 0.5.0 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                       
✔ Cached copy of markdown 1.13 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build                      
✔ Cached copy of broom.helpers 1.15.0 (x86_64-pc-linux-gnu-ubuntu-20.04) is the latest build              
✔ Downloaded 1 package (135.61 kB) in 3s                                        
ℹ Installing system requirements
ℹ Executing `sudo sh -c apt-get -y update`
ℹ Executing `sudo sh -c [ $(which google-chrome) ] || apt-get install -y gnupg curl`
ℹ Executing `sudo sh -c [ $(which google-chrome) ] || curl -fsSL -o /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb`
ℹ Executing `sudo sh -c [ $(which google-chrome) ] || DEBIAN_FRONTEND='noninteractive' apt-get install -y /tmp/google-chrome.deb`
ℹ Executing `sudo sh -c rm -f /tmp/google-chrome.deb`
Error:                                                                                                                
! error in pak subprocess
Caused by error in `verify_extracted_package(filename, pkg_cache)`:
! /tmp/RtmpzS2xLi/file1f35480213b4/src/contrib/x86_64-pc-linux-gnu-ubuntu-20.04/4.4/urltools_1.7.3.tar.gz is not a valid
binary, it is missing urltools/Meta/package.rds.
Type .Last.error to see the more details.
Warning message:
R graphics engine version 16 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed. 

I have tried to remove remotes from the DESCRIPTION file without luck.

I can see that the R version has been updated:

> R.Version()
$platform
[1] "x86_64-pc-linux-gnu"

$arch
[1] "x86_64"

$os
[1] "linux-gnu"

$system
[1] "x86_64, linux-gnu"

$status
[1] ""

$major
[1] "4"

$minor
[1] "4.0"

$year
[1] "2024"

$month
[1] "04"

$day
[1] "24"

$`svn rev`
[1] "86474"

$language
[1] "R"

$version.string
[1] "R version 4.4.0 (2024-04-24)"

$nickname
[1] "Puppy Cup"

The version before was 4.1.1.

lwjohnst86 commented 2 weeks ago

oooo they finally updated R, did they! About time. Hmm, means we might have some bugs to figure out now...

lwjohnst86 commented 2 weeks ago

The issue seems to be coming from the urltools package, which is a dependency of some other packages.

nielsbock commented 2 weeks ago

install.packages("urltools") solved the issue! Thanks!

nielsbock commented 2 weeks ago

@lwjohnst86 minor detail: should I update the the R version in my paper?

https://github.com/steno-aarhus/legliv/blob/311171cfacdd7641cd5ce77c551cfff77b8cd896/doc/legliv-nutrients/legliv-nutrients.Rmd#L396

lwjohnst86 commented 2 weeks ago

Probably. You can include an automatic insertion of the version with:

`r version$version.string`

🤩