jeudi 22 juin 2017

Install R 3.4.0 from source on ubuntu 16.04

This tutorial is modified from https://askubuntu.com/questions/798335/how-you-install-r-3-2-2-in-ubuntu-14-04-lts

cd $HOME
wget https://cran.rstudio.com/src/base/R-3/R-3.4.0.tar.gz
tar xvf R-3.4.0.tar.gz
cd R-3.4.0
sudo apt-get install gcc fort77 aptitude
sudo aptitude install g++
sudo aptitude install xorg-dev
sudo aptitude install libreadline-dev
sudo aptitude install gfortran
gfortran --version
sudo apt install libpcre3-dev liblzma-dev libbz2-dev
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
sudo apt-get install texlive-base
sudo apt-get install texinfo
sudo apt-get install texlive-fonts-extra
sudo apt-get install libcurl4-openssl-dev
java -version
# need to build shared library (--enable-R-shlib)
# the --enable-R-shlib option is needed for the RStudio IDE to work
sudo ./configure --enable-R-shlib      
sudo make
sudo make install
R --version
cd $HOME
rm R-3.4.0.tar.gz
sudo rm -rf R-3.4.0

Now you can install Rstudio:

wget https://download1.rstudio.org/rstudio-1.0.143-i386.deb
sudo gdebi -n rstudio-1.0.143-i386.deb

rm rstudio-1.0.143-i386.deb

mardi 13 juin 2017

No ssh connection: REMOTE HOST IDENTIFICATION HAS CHANGED

When you try to connect using ssh in terminal to a remote host, if you get this message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:wJp/vYtoiAonG/LRyXK6fYuzcCb7WQZF1N9tlxVVOsg.
Please contact your system administrator.



you must edit this file:
sudo vi ~/.ssh/known_hosts
And remove the line corresponding to the faulty ip address.

mercredi 31 mai 2017

Install Command Line Interface for openstack on MacOSX Sierra 10.12.5

The documents present in the openstack server to install Command Line Interface are not uptodate for MacOSX:
https://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html

 Here is the solution. It has been tested in Sierra 10.12.5.

First be sure that you have python install. In terminal, enter:
belinda:~ marcgirondot$ python --version
Python 2.7.13

Any version higher than 2.7 should work. If you have not, when installing Xcode, python should be included.

Install Xcode from app store (take care, it is 4 GB !)
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12

Open Xcode from application folder and install line command tools in terminal:
sudo xcode-select --install

Validate the installation in terminal using:
sudo xcodebuild -license

Install pip:
sudo easy_install pip

Upgrade pip:
sudo -H pip install --upgrade pip --ignore-installed six

Install different components of openstack:

# Installation 
sudo -H pip install python-openstackclient --ignore-installed six

sudo -H pip install --upgrade python-novaclient --ignore-installed six
sudo -H pip install --upgrade python-cinderclient --ignore-installed six
sudo -H pip install --upgrade python-neutronclient --ignore-installed six
sudo -H pip install --upgrade python-glanceclient --ignore-installed six
# for nova
sudo -H pip install --upgrade netifaces --ignore-installed six

To run it, you must define environment variables as described here:
https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html

It works for me !

To upgrade openstack client:
sudo -H pip install --upgrade python-openstackclient --ignore-installed six

samedi 8 octobre 2016

Install manually Endnote plugin for Word 2016 in MacOSX

If you install Office 2016 after you have installed Endnote 7.7, the plugin Endnote is not available in Word 2016. Here is a simple solution :
you should go in the menu Endnote of the Endnote X7 application and use the function Customizer.

Version française d'Office 365 pour MacOSX avec des formules en anglais

Les précédentes versions d'Office se présentaient sous la forme d'une version différente par localisation linguistique, ce qui n'est clairement pas très économique ni financièrement ni en terme de place.
Avec la version Office 365, on a une seule version qui se localise d'elle-même en fonction de la langue du système dans laquelle vous êtes. C'est bien mieux... sauf qu'on se retrouve avec la langue des fonctions d'Excel traduite ! Cela m'a toujours semblé un anachronisme (essayez d'écrire du C en français !). Voici la solution pour avec une version d'Excel localisée en français mais des fonctions en Anglais. 

Dans le terminal, entrez cette commande pour Excel >16.9:

sudo cp /Applications/Microsoft\ Excel.app/Contents/Resources/fr.lproj/strman_0408.strings /Applications/Microsoft\ Excel.app/Contents/Resources/fr.lproj/strman_0408.strings.old

sudo cp /Applications/Microsoft\ Excel.app/Contents/Resources/en.lproj/strman_0408.strings /Applications/Microsoft\ Excel.app/Contents/Resources/fr.lproj/strman_0408.strings

For Excel before 16.9:


sudo cp /Applications/Microsoft\ Excel.app/Contents/Resources/en.lproj/strman_0527.strings /Applications/Microsoft\ Excel.app/Contents/Resources/fr.lproj/strman_0527.strings

Si vous avez modifié la localisation de l'application Microsoft Excel il faudra modifier le path /Applications/Microsoft\ Excel.app en fonction de la nouvelle localisation.

Vous pouvez trouver le nouveau path avec cette commande:
sudo find /Applications -name "Microsoft Excel.app"

Attention de bien choisir la version Excel 2016 !

Si votre système est dans une autre langue que le français, il faudra modifier fr.lproj avec la valeur correspondant à la langue de votre système. Je vous la laisse choisir:

ar.lproj
cs.lproj
da.lproj
de.lproj
es.lproj
fi.lproj
fr.lproj
id.lproj
it.lproj
ja.lproj
ko.lproj
nl.lproj
no.lproj
pl.lproj
pt_PT.lproj
pt.lproj
ru.lproj
sv.lproj
th.lproj
tr.lproj
zh_CN.lproj
zh_TW.lproj


lundi 8 février 2016

Sortir un cd du lecteur de type mange-disque

Le lecteur de CD étant hors-service, lorsque un CD est introduit, il ne monte pas sur le bureau et impossible de le sortir avec les méthodes classiques, même en appuyant sur le bouton de la souris ou du trackpad au démarrage.
La solution a été de lancer cette commande sur le terminal:
sudo drutil eject
et en même temps introduire une carte bancaire dans la fente du mange-disque au moment où le disque bouge. On parvient à glisser la carte bancaire sur le disque qui se met en mouvement et il parvient à sortir.


vendredi 26 juin 2015

Remove old MacTex distribution

From https://tug.org/mactex/uninstalling.html

The only difficulty is that TeX Live is owned by root and lives in a location that is not commonly visible in the Finder. But it is easy to work around this problem. In the Finder's Go menu, select "Go to Folder"; in the resulting dialog window, type "/usr/local/texlive". You will see folders containing various copies of TeX Live. Drag the folder corresponding to the version of TeX Live you want to uninstall to the trash. You will need to provide an administrative password when asked. 

The folder texmf-local is available for local additions to TeX. These local additions are used by all versions of TeX Live, so if you added files for TeX Live xxxx, they are still around for TeX Live xxxx+1. When MacTeX is installed, it doesn't touch texmf-local if it already exists, but it creates an empty directory tree if none is present.

Consequently, if you are updating TeX Live to a new version, you want to leave texmf-local alone. But if you are trying to remove all traces of TeX, then remove texmf-local by dragging it to the trash.