chrisvwn / Rnightlights

R package to extract data from satellite nightlights.
GNU General Public License v3.0
47 stars 14 forks source link

remove and reinstall the package #35

Closed letitbk closed 4 years ago

letitbk commented 5 years ago

Hi, thanks much for developing this wonderful R package. I tried to reinstall the program by deleteting the hidden directory (./Rnightlights/...) and reinstalling the package, which seems to fail no matter how I do this. It seems like that there's some files that you used to record the directory information. How can I remove the package and reinstall?

My OS is 16.04.6 LTS (GNU/Linux 4.4.0-1085-aws x86_64), and R version 3.5.3 (2019-03-11) -- "Great Truth"

> install.packages('Rnightlights')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/Rnightlights_0.2.3.tar.gz'
Content type 'application/x-gzip' length 216596 bytes (211 KB)
==================================================
downloaded 211 KB

* installing *source* package ‘Rnightlights’ ...
** package ‘Rnightlights’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
2019-06-23 02:37:11: Upgrading data directory to ver. 0.2.3
Warning in file(file, ifelse(append, "a", "w")) :
  cannot open file '/home/ubuntu/data/.Rnightlights/data/../data-version.txt': No such file or directory
Error: package or namespace load failed for ‘Rnightlights’:
 .onAttach failed in attachNamespace() for 'Rnightlights', details:
  call: file(file, ifelse(append, "a", "w"))
  error: cannot open the connection
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/Rnightlights’

The downloaded source packages are in
    ‘/tmp/RtmptuQ61y/downloaded_packages’
Warning message:
In install.packages("Rnightlights") :
  installation of package ‘Rnightlights’ had non-zero exit status
chrisvwn commented 5 years ago

Hi @letitbk ,

Thanks I am glad you are finding it of use.

This is a strange error. It should only happen if the folder was deleted while the package is still installed. Are you running remove.packages("Rnightlights")?

Alternatively, please make sure the user you are installing as has permission to install to /usr/local/lib/R/site-library/ and that the partition is not full.

Let me know how it goes.

letitbk commented 5 years ago

Yes, I remove.packages, and if I tried to do this again, I got the following message:

> remove.packages('Rnightlight')
Removing package from ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : 
  there is no package called ‘Rnightlight’

Yes, I have the permission to install to the folder, and the partition is not full.

chrisvwn commented 5 years ago

there is no package called ‘Rnightlight’

Note the package is called Rnightlight*s*

letitbk commented 4 years ago

Hi @chrisvwn, I am sorry that I didn't respond to this properly. I could successfully remove the package, and reinstall the package. I really thank you for your timely support and maintaining your pakcage in a responsive manner. Thanks!!

chrisvwn commented 4 years ago

Hi @letitbk .Thank you for the feedback. I am glad you were able to reinstall it. I hope the package is working well for you.