microsoft / microsoft-r-open

Microsoft R Open Source
212 stars 69 forks source link

Installation fails in Ubuntu 16.04 if there is a previous version installed #21

Open jlopezpena opened 7 years ago

jlopezpena commented 7 years ago

I had MRO version 3.3.1 installed, downloaded and tried to install version 3.3.2, and it fails with this message:

There was an error installing Microsoft R Open.
Please check the logs at:
/home/javier/Downloads/microsoft-r-open/logs

in the logs/mkl.txt file, I find this:

(Reading database ... 958646 files and directories currently installed.)
Preparing to unpack .../microsoft-r-open-mkl-3.3.deb ...
mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/*.so': No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
rm: cannot remove '/usr/lib64/microsoft-r/3.3/lib64/R/lib/*.so': No such file or directory
mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/*.so': No such file or directory
dpkg: error processing archive /home/javier/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb (--install):
 subprocess new pre-removal script returned error exit status 1
mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/lib/*.so': No such file or directory
cp: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/libR.so': No such file or directory
cp: cannot stat '/usr/lib64/microsoft-r/3.3/stage/mkl_install_stage/*.so': No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /home/javier/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb

I have also tried to force-remove previous versions of mkl as suggested in #10 , to no avail:

javier@javier-Desktop:~/Downloads/microsoft-r-open/logs$ sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-mkl-3.3
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 958645 files and directories currently installed.)
Removing microsoft-r-open-mkl-3.3 (3.3.1) ...
rm: cannot remove '/usr/lib64/microsoft-r/3.3/lib64/R/lib/*.so': No such file or directory
mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/*.so': No such file or directory
dpkg: error processing package microsoft-r-open-mkl-3.3 (--remove):
 subprocess installed pre-removal script returned error exit status 1
mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/lib/*.so': No such file or directory
cp: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/libR.so': No such file or directory
cp: cannot stat '/usr/lib64/microsoft-r/3.3/stage/mkl_install_stage/*.so': No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 microsoft-r-open-mkl-3.3

Other suggestion in this post also doesn't wotk:

javier@javier-Desktop:~/Downloads/microsoft-r-open/logs$ sudo apt-get -f autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package microsoft-r-open-mkl-3.3 needs to be reinstalled, but I can't find an archive for it.

After attempting this I cannot even run my old R version. Is there a way for force a clean-up and reinstall?

cdeterman commented 7 years ago

I second this problem with the same issue on 14.04. Seems I cannot remove broken microsoft R. The weird thing is for the following error

dpkg: trying script from the new package instead ... rm: cannot remove '/usr/lib64/microsoft-r/3.3/lib64/R/lib/*.so': No such file or directory

I can see the *.so files in that location

ls /usr/lib64/microsoft-r/3.3/lib64/R/lib/lib

libiomp5.so           libmkl_gf_lp64.so     libmkl_vml_mc3.so
libmkl_core.so        libmkl_gnu_thread.so  libRblas.so
libmkl_gf_ilp64.so    libmkl_vml_def.so     libRlapack.so
cdeterman commented 7 years ago

Okay, so what I did was basically create all the files it was looking for in those directories with sudo touch .... Then I could get everything remove and reinstalled.

jjkoehorst commented 7 years ago

I have I think the same issue. As due to some dependencies the mran broke and I wanted to reinstall it. I already removed it completely according to the uninstallation procedure thus the folders in which the errors occur in:

rm: cannot remove '/usr/lib64/microsoft-r/3.3/lib64/R/lib/.so': No such file or directory mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/.so': No such file or directory mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/lib/.so': No such file or directory cp: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/libR.so': No such file or directory cp: cannot stat '/usr/lib64/microsoft-r/3.3/stage/mkl_install_stage/.so': No such file or directory

are either non existent or empty. If I install mran without MKL the installation succeeds but then I don't have MKL. How can I use the installation script after I performed a:

sudo rm -rf /usr/lib64/microsoft-r/3.3/

jshousephd commented 7 years ago

I am having the same issue. Preparing to unpack .../microsoft-r-open-mkl-3.3.deb ... mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/.so': No such file or directory dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg: trying script from the new package instead ... rm: cannot remove '/usr/lib64/microsoft-r/3.3/lib64/R/lib/.so': No such file or directory mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/.so': No such file or directory dpkg: error processing archive /home/john/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb (--install): subprocess new pre-removal script returned error exit status 1 mv: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/lib/.so': No such file or directory cp: cannot stat '/usr/lib64/microsoft-r/3.3/lib64/R/backup/lib/libR.so': No such file or directory Errors were encountered while processing: /home/john/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb