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

Installation of ggplot2 fails because of failed to lock fastr library directory on macOS #192

Closed
TinusChen opened this issue Dec 10, 2021 · 2 comments
Labels

Comments

@TinusChen
Copy link

Repro: 'install.packages("ggplot2")'

ERROR: failed to lock directory ‘/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6’ for modifying

Here's the error:

> install.packages("ggplot2")
Installing package into/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6’
(aslibis unspecified)
also installing the dependencygtableContent type 'application/octet-stream' length 368081 bytes (359 KB)
Content type 'application/octet-stream' length 3204655 bytes (3.1 MB)
ERROR: failed to lock directory/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6for modifying
Try removing/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable* installing *source* packageggplot2...
** packageggplot2successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (ggplot2)

The downloaded source packages are in/private/var/folders/44/gx8cvxzn511_pr_g39l6t2f40000gn/T/RtmpXYbxMu/downloaded_packagesWarning message:
In install.packages("ggplot2") :
  installation of packagegtablehad non-zero exit status
> install.packages("ggplot2", INSTALL_opts = c('--no-lock'))
Installing package into/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6’
(aslibis unspecified)
Content type 'application/octet-stream' length 3204655 bytes (3.1 MB)
* installing *source* packageggplot2...
** packageggplot2successfully unpacked and MD5 sums checked
staged installation is only possible with locking
** using non-staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)

The downloaded source packages are in/private/var/folders/44/gx8cvxzn511_pr_g39l6t2f40000gn/T/RtmpXYbxMu/downloaded_packages

I was able to fix this by running the following commands as a workaround:

install.packages("ggplot2", INSTALL_opts = c('--no-lock'))

The same situation will be encountered when installing another package 'gtable'. This problem can be also solved using the above method.

Env:

graalvm-ce-java11-21.0.0.2
fastr-21.0.0.2-3.6

> version
                            
platform       x86_64-apple-darwin16.7.0       
arch           x86_64                          
os             darwin16.7.0                    
system         x86_64, darwin16.7.0            
major          3                               
minor          6.1                             
year           2019                            
month          07                              
day            05                              
svn rev                                        
language       R                               
engine         FastR                           
version.string FastR version 3.6.1 (2019-07-05)
@TinusChen TinusChen added the bug label Dec 10, 2021
@steve-s
Copy link
Member

steve-s commented Dec 10, 2021

Hello TinusChen,

have you tried removing the /Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable directory as the error message suggests? You can do that with

rm -rf /Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable

If you can reproduce this issue again and following the suggestions in the error message:

ERROR: failed to lock directory ‘/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6’ for modifying
Try removing ‘/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable’

do not fix the problem, then please re-open this issue.

@steve-s steve-s closed this as completed Dec 10, 2021
@TinusChen
Copy link
Author

Hello TinusChen,

have you tried removing the /Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable directory as the error message suggests? You can do that with

rm -rf /Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable

If you can reproduce this issue again and following the suggestions in the error message:

ERROR: failed to lock directory ‘/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6’ for modifying
Try removing ‘/Users/tinus.chen/R/x86_64-apple-darwin-library/fastr-21.0.0.2-3.6/00LOCK-gtable’

do not fix the problem, then please re-open this issue.

The problem could be also solved by removing the 00LOCK-gtable directory. Thanks for your suggestion.

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

No branches or pull requests

2 participants