How to completely uninstall opencv ubuntu? - opencv

I am installing caffe and I think I screwed up my install by having multiple versions of OpenCV. Now i don't know what i did on my own but nothing seems to work right. So my safest bet is to do a complete utter uninstall of opencv. How do i do that help thanks ?
I would like to install python after that using conda
I followed this thread Removing all installed OpenCV libs
although when i typed $> sudo find / -name "*opencv*" -exec rm -i {} \;
ubuntu still keeps asking me for permission to remove every file which is annoying. how do i tell ubuntu to remove it all ?

If you installed OpenCV using CMake then there should be an uninstall file in the same location as the install file, just run sudo make uninstall.

remove the -i option. -i option stands for "interactive"

Related

How to fix Homebrew in High Sierra?

Couldn't find a question specifically dealing with this problem in OS X High Sierra. As I still struggle to find a solution that works for me I think it is a good idea to separate old answers from new ones.
So, the problem:
$brew install wget
Error: Could not create /usr/local/Cellar
Check you have permission to write to /usr/local
I tried:
sudo chown -R $(whoami) $(brew --prefix)/*
But this leaves me with the same error.

Install MacVim in Sierra

I have a new laptop with Sierra. I brought my applications from my old mac with Time Machine and most of them are working fine. However, Macvim disappeared. I tried to install it.
I tried to re-install it by installing Homebrew and brew installing macvim. The install looks successful, but I still cannot find nor use macvim. I guess this is a matter again of application files no longer being in /usr/ but in Library/, but honestly I am a bit lost as to how to figure out whether this is the problem and how to fix it.
Can you please help me out with this?
How I installed Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
How I installed Macvim:
brew install macvim
MacVim is keg-only.
If you run this command after installation:
brew linkapps
you will find MacVim in your Applications folder in finder.
Since linkapps is now deprecated, I've had to manually link .app via
ln -Fs `find /usr/local -name "MacVim.app"` /Applications/MacVim.app
Unfortunately, Spotlight cannot find MacVim this way. Therefore, I've (after opening the app by double-clicking on the icon in Finder's Applications folder) right-clicked on the app's icon on the dock and selected Option -> Keep in Dock.
The symbolic soft link solution described by #laylaylom works; but I am having trouble setting MacVim as my default app for some filetype. Then I found this from here:
% mkdir ~/Applications/Emacs.app
% ln -s /usr/local/Cellar/emacs/23.2/Emacs.app/Contents ~/Applications/Emacs.app
That solution was for Emacs.app but it can work with MacVim as well:
% mkdir ~/Applications/MacVim.app
% ln -Fs /usr/local/Cellar/macvim/8.1-151/MacVim.app/Contents ~/Applications/MacVim.app
There is now a cask for MacVim, but it's not the default. The correct command is:
brew install homebrew/cask/macvim
This will install MacVim in the Applications folder, and make it available to Spotlight.

libMagickCore.so.4: cannot open shared object file: No such file or directory

I am facing is issue in my rails 3.2.17 application. I have install rmagick 2.13.2 ImageMagick 6.7.7-10 in my ubuntu machine. I did locate libMagick and I found the below list:
$ locate libMagick
/usr/lib/x86_64-linux-gnu/libMagickCore.a
/usr/lib/x86_64-linux-gnu/libMagickCore.la
/usr/lib/x86_64-linux-gnu/libMagickCore.so
/usr/lib/x86_64-linux-gnu/libMagickCore.so.5
/usr/lib/x86_64-linux-gnu/libMagickCore.so.5.0.0
/usr/lib/x86_64-linux-gnu/libMagickWand.a
/usr/lib/x86_64-linux-gnu/libMagickWand.la
/usr/lib/x86_64-linux-gnu/libMagickWand.so
/usr/lib/x86_64-linux-gnu/libMagickWand.so.5
/usr/lib/x86_64-linux-gnu/libMagickWand.so.5.0.0
RMagick2.so is depends on libMagickCore.so.4, but you don't have it.
For workaround try this:
sudo ln -s /usr/lib/x86_64-linux-gnu/libMagickCore.so.5 /usr/lib/x86_64-linux-gnu/libMagickCore.so.4
sudo ln -s /usr/lib/x86_64-linux-gnu/libMagickWand.so.5 /usr/lib/x86_64-linux-gnu/libMagickWand.so.4
sudo ldconfig
If this does not work, probably, you need earlier version of ImageMagick.
Finally I could find the solution. Hope this may help others also. Actually "libmagickcore4" libs was missing. So install it using below command.
sudo apt-get install libmagickcore4

RVM hangs on 'Installing required packages' on Debian

I installed rvm on debian 7 using the command:
\curl -L https://get.rvm.io | bash -s stable --rails
from this article:
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-an-debian-7-0-wheezy-vps-using-rvm
I get this output:
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for debian.
Installing requirements for debian.
Updating system...
Installing required packages: gawk, g++, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev
It hangs here forever. I tried waiting about 30 min. I also tried hitting ctrl-c and running some rvm commands. rvm list known works fine, but rvm install gets me back to the same "installing requirements" and it hangs as well.
Any ideas? Googleing only seemed to bring up issues involving OSX (I'm using debian in a vbox in windows 8).
Would installing each required package indiviually via apt-get be the best move?
I faced the same issue. To resolve, just mount the installation CD that you used to install Debian and it will work.
I encountered the same issue with Debian 8. As it turns out, the installation was looking for the required packages on the Debian install CD-ROM, which wasn't inserted. To fix this, run the following command:
nano /etc/apt/sources.list
Then, comment out the line beginning with "cdrom" so that it looks like the following:
# cdrom:[Debian GNU/Linux...
You should be able to run sudo apt-get update then try installing rvm again. However, I restarted my laptop before doing so. Therefore, I can't give 100% confirmation that it works without restarting.
As i've written in comment, try installing requirements by hand, sometimes something wilk silently fail and cause such issues. As OP found, the gawk package was causing the issue.
Just remove the cdrom entry from the sources.list file. This can be done easily:
sudo sed -i '/cdrom/d' /etc/apt/sources.list
This should take care of the problem. The message is because somehow you still have the cdrom entry in your sources.list file, you can check the content of the file using:

Install ImageMagick for paperclip gem in a Mac OS 10.5.8

I have been trying to install ImageMagick for one week. The documentation I found over the net it is contradictory and I didn't find the proper way to install it and configure it. As well as I am not an UNIX expert so I don´t know how to use Enviroments paths correctly.
My software versions are:
S.O.: Mac OS 10.5.8,
ImageMagick v6.7.7,
Paperclip v3.1.2,
Rails v3.0
Some hints:
The ~/.profile file:
export PATH=$HOME/Users/mac_name/.gem/ruby/1.8/bin:$PATH
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MAGICK_HOME="/Users/mac_name/ImageMagick-6.7.7"
export DYLD_LIBRARY_PATH=$MAGICK_HOME/lib/
export DISPLAY=:0
I install ImageMagick with an installation script. Its located in: Users/mac_name/ImageMagick-6.7.7
Now I think it´s installed but paperclip it does not run. I still have the error: "Photo Could not run the identify command. Please install ImageMagick".
$ echo $MAGICK_HOME
it returns: "/Users/mac_name/Users/mac_name/ImageMagick-6.7.7" (I don´t know why "Users/mac_name" it is repeated)
I need help. Any other gem that does not need ImageMagick? I am totally upset of this...
I will suggest you to install homebrew and then install imagemagick using that.
To install Homebrew check this. Basically just copy paste this on your terminal:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Now to install imagemagick run this command:
brew install imagemagick
Lemme know if you face any issues.
Mohit has a great answer but the link seems broken now so checkout either
Homebrew Homepage at http://brew.sh or the Github page at https://github.com/mxcl/homebrew
Both have good instructions on proper installation

Resources