microsoft / microsoft-r-open

Microsoft R Open Source
212 stars 69 forks source link

Installation failed on Ubuntu 16.04 #10

Closed giantwhale closed 7 years ago

giantwhale commented 7 years ago

I am having the following error message:

Press [Enter] key to display the Microsoft R Open license. When finished reading, press q to continue: 

Do you wish to install the Intel MKL libraries?
Choose [y]es|[n]o y

Press [Enter] key to display the Intel MKL license. When finished reading, press q to continue: 
Do you agree to the terms of the previously displayed license?
Choose [y]es|[n]o y

Updating apt package repositories...done
Installing apt package dependencies libxt6 libsm6 libpango1.0-0 libgomp1 curl...done
Installing /home/yue/Downloads/microsoft-r-open/deb/microsoft-r-open-mro-3.3.deb...done
Installing /home/yue/Downloads/microsoft-r-open/deb/microsoft-r-open-foreachiterators-3.3.deb...done
Installing /home/yue/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb...ERROR!

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

And the error log is:

(Reading database ... 228171 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/yue/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/yue/Downloads/microsoft-r-open/deb/microsoft-r-open-mkl-3.3.deb

if I only install R and skip MKL, i cannot install pakcages in an R session:

> install.packages('microbenchmark')
Installing package into ‘/home/yue/R/3.2’
(as ‘lib’ is unspecified)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15405  100 15405    0     0  37000      0 --:--:-- --:--:-- --:--:-- 40539
Error : .onLoad failed in loadNamespace() for 'RevoUtilsMath', details:
  call: fun(libname, pkgname)
  error: To use RevoUtilsMath you must first install the MKL Math Library.
 Visit http://mran.revolutionanalytics.com/download.
 If you have previously installed the MKL Math Library,
remove it and then re-install.
Error: package or namespace load failed for ‘RevoUtilsMath’
Execution halted

The downloaded source packages are in
    ‘/tmp/Rtmp8KvUwc/downloaded_packages’
Warning message:
In install.packages("microbenchmark") :
  installation of package ‘microbenchmark’ had non-zero exit status

Any one can help?

nathansoz commented 7 years ago

We have never been able to reproduce this issue on Ubuntu 16.04, but can you try the following:

If you don't mind, could you remove each of the following packages using the command:

for each of the packages below run:

sudo dpkg --remove

microsoft-r-open-mkl-3.3 microsoft-r-open-foreachiterators-3.3 microsoft-r-open-mro-3.3 If for some reason removing any package fails, try adding --force-remove-reinstreq after --remove.

After you do this, run:

sudo rm -rf /usr/lib64/microsoft-r/3.3 (this will destroy the folder)

Finally, can you please use dpkg to install each of the packages (mro, foreachiterators, mkl)? I'd like to know if it works or not. If it doesn't work, I'd be curious to know if you have any custom bash shell options set (like noglob). When I did my testing, I used a clean install of Ubuntu Server 16.04, so I am trying to figure out how I can get a repro.

giantwhale commented 7 years ago

after completely removing installed package via dpkg --remove and rm -rf xxx, I still see the follow error message. I previously had MRO-3.2.5 successfully installed, not sure why it failed this time.

xxx@yyy ~/Downloads/microsoft-r-open/deb $ sudo dpkg -i microsoft-r-open-mkl-3.3.deb 
(Reading database ... 225397 files and directories currently installed.)
Preparing to unpack microsoft-r-open-mkl-3.3.deb ...
Unpacking microsoft-r-open-mkl-3.3 (3.3.1) over (3.3.1) ...
dpkg: dependency problems prevent configuration of microsoft-r-open-mkl-3.3:
 microsoft-r-open-mkl-3.3 depends on microsoft-r-open-mro-3.3; however:
  Package microsoft-r-open-mro-3.3 is not installed.

dpkg: error processing package microsoft-r-open-mkl-3.3 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 microsoft-r-open-mkl-3.3

The following actually works:

sudo apt-get -f autoremove
sudo rm -rf /usr/lib64/microsoft-r
sudo ./install.sh

Now my R is functioning well.

yipcma commented 7 years ago

the only way that works for the awkward upgrading from previous versions. at least there's one way that works.

ironfrown commented 7 years ago

The problem was that MKL does not get removed on MRO reinstallation and then MRO installation script gets confused. The following worked for me:

sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-mkl-3.3
sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-foreachiterators-3.3
sudo dpkg --remove --force-remove-reinstreq microsoft-r-open-mro-3.3
sudo rm -rf /usr/lib64/microsoft-r/3.3
sudo apt-get -f autoremove
sudo ./install.sh

R and R Studio now work just fine!