I got some errors while trying to install R-studio in Ubuntu 16.04, because R-base was not properly installed, so I wanted to delete R-base and re-install it. I tried several solutions mentioned in other threads, but they didn't work. The same error keeps popping up.

For example when I use this command:

sudo apt-get purge r-base-core

I get the following error (which also pops up with other commands for removal):

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be removed:
r-base-core* r-base-dev* r-base-html* r-cran-boot* r-cran-class* r-cran-cluster*
r-cran-codetools* r-cran-foreign* r-cran-kernsmooth* r-cran-lattice*
r-cran-mass* r-cran-matrix* r-cran-mgcv* r-cran-nlme* r-cran-nnet*
r-cran-rpart* r-cran-spatial* r-cran-survival* r-recommended*
0 upgraded, 0 newly installed, 19 to remove and 337 not upgraded. 1 not
fully installed or removed.
After this operation, 57.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y

Setting up install-info (6.1.0.dfsg.1-5) ...
/usr/sbin/update-info-dir: 1: /etc/default/locale: -e: not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
install-info E: Sub-process /usr/bin/dpkg returned an error code (1)

  • try sudo mv /var/lib/dpkg/info/install-info.postinst /var/lib/dpkg/info/install-info.postinst.old followed by update and upgrade – user308164 Dec 16 '16 at 9:23
  • @luchonacho When I do that, it says mv: missing destination file operand after '/var/lib/dpkg/info/install-info.postinst'. – arimas Dec 17 '16 at 7:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.