I'm trying to get my Linux environment updated with the latest R packages which is proving to be quite difficult. The R version on my Linux machine is 3.2.3 (Wooden Christmas-Tree), and despite 2-days of troubleshooting I still cannot get the update commands to execute. An updated version of R is required before the bioconductor suite can download (“A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install”).
Typically, two simple commands will update R in Linux:
sudo apt-get update
Followed by:
sudo apt-get install r-base
However, I cannot get the sudo apt-get update to work, I keep getting the following error message:
E: Could not get lock /var/lib/apt/lists/lock - open (11:Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
From what I’ve read on the web, to fix the problem, you must remove the lock files using the commands below:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
After that, reconfigure the packages:
sudo dpkg --configure -a
But it doesn't work!?! Anyone else using Linux ever experience a similar error message?
Since you have
sudo
privileges it is unclear why that is not working. Are you using both a GUI and a terminal window to try and update these packages?I suppose you mean that, even after trying the above solution, you get the same error:
What is your operating system, and its version?
Alpha OS 1.0.0 Polaris, Built on "Ubuntu 16.04.3 LTS", Linux 4.13.0-45-generic.
I have found two Alpha OSes, one based on Arch Linux and another on Puppy Linux. I guess your Alpha OS is the Puppy Linux one, as Puppy is based on Ubuntu. Did you install it onto the hard-drive, or are you running from a pen-drive?
Anyway, my suggestion is to install one of the major Linux distributions, which have large user bases, both inside and outside the bioinformatics community.
see if aptitude, synaptic or update manager are running. Type
ps aux| grep apt
see if apt is running in the background.I was able to update R using conda:
But when I launch a new R session, I keep seeing the older version...
Do I need to restart my system? Something seems wrong.
Older version of R must be in your
$PATH
. You could either remove old R or append path to newR
before your current path by doingexport PATH=/path_to_new_R/$PATH
.You either need to add the newly installed
R
to your$PATH
, or create a named conda environment andactivate
it:This ^ was a winner! I'm now running 3.5.0 and was able to FINALLY install the Bioconductor suite. Thanks to all!
Seriously, thank you!
I moved @Ram's original comment (which has all the information needed) to an answer. You can accept that to provide closure to this thread.