Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Accidentally I have installed R library in my home directory

/home/user/R/i686-pc-linux-gnu-library

And I want to move all this "/R/i686-pc-linux-gnu-library" thing to original R libraries directory.

I probably can't use mv as it will mess up everything.

What is the proper way of moving installed (R) libraries in Linux?

share|improve this question

3 Answers 3

Although I agree with both niffle and Tom, you really should just reinstall, doing something like this might, I say might, also work:

$ cp -rv /home/user/R/i686-pc-linux-gnu-library /usr/lib/R/library/

Then apply the same permissions you see in other sub folders of /usr/lib/R/library/.

Why do you want to move the files though? The library will work perfectly well from your $HOME and it will not be deleted if you upgrade your machine. Is there a particular reason you want to go to the trouble of moving it?

share|improve this answer

The safest way is to uninstall it then reinstall in the in the correct place.

It's really the only way to be sure you don't run into any problems.

share|improve this answer

You should give it the right permissions after moving them...

Use a package manager next time; or use one now, to ensure it's installed the proper way.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.