I currently have Armadillo 9.900.4 installed on my machine with Ubuntu 20.04. I have downloaded 10.1.0 and ran cmake .
and sudo make install
and when I recompile my code and run it it says it was compiled with 9.900.4. Am I do something wrong? Is there a way to fully remove armadillo and reinstall?
Thank you
That is the drawback of using make install
to install something. It circumvents your distro package manager and then you have to manually clean/upgrade what you have installed like that. It's also up to the creator of the library what the install
make target actually does.
Some libraries also create a "uninstall" target to make uninstalling easier. I don't know if armadillo does that, but you can just try running make uninstall
from the folder where you compiled and run the make install
command to check.
In any case, Linux has standard directories where libraries and headers are installed. Usually all that the install
make target does is to copy the appropriated files to these folders. Then all you need to do is to delete these files manually. Try to look in the /usr/include
folder for the headers, and in the /usr/lib
folder for the compiled libraries (the name can vary a little from distribution to distribution).
If you can't find them, you can use the locate
program. Just run locate armadillo
in the shell. I'm not sure if it is already installed in ubuntu, though.
You might also just use armadillo as a header only library without "installing it" in your system. In that case, you will need to link your program with a BLAS implementation as well as Lapack. In fact, when you compile armadillo all it does is to create a "wrapper library" that you can link with and that already links with BLAS and Lapack (most of armadillo code is templated code).
TLDR;
Search in the /usr/include
(or something similar) for armadillo readers and delete them. Search for in the /usr/lib
(or something similar) for the compiled armadillo library and delete it.