Restoring from Backup to Fix Installation Problems


(Saulspatz) #1

Am I correct that if I want to restore from backup to roll back changes created with brew install, brew cleanup, and so on, that it is sufficient to restore /usr/local? That is, that Homebrew doesn’t alter anything outside /usr/local by default? I’ve detailed the background below, if you’re interested.

I have been trying to install openCV (not with Homebrew.) I installed it correctly, without ffmpeg support, but then I installed ffmpeg (with Homebrew) and tried to reinstall openCV. It failed with a bunch of linker errors related to freetype. Now if I try to install openCV even with ffmpeg support, I get these same errors. I noticed that when I install ffmpeg, Homebrew upgraded freetype to version 2.7.1, so I guess this is the source of the problem, especially since I see that 2.7.1 dates from 12-30-2016. Now I want to roll back, and try to install an older version of ffmpeg, but Homebrew won’t let me uninstall freetype because of dependencies. Also, I stupidly ran brew cleanup sometime during thsi process (I’ve been trying to debug the problem for a few days) so I’ve lost all the prior versions of freetype. It seems like the easiest thing to do would be to roll back to the point just before I installed ffmpeg.

By the way,
brew tap homebrew/science
brew install opencv3 --with-ffmpeg --with-tbb —with-contrib

gives me the same linker errors, so I feel certain that it’s not some mistake I’m making. (I’m doing my own installation because I want to install into an anaconda virtual environment, and I’m afraid of a conflict.)


(Mike McQuaid) #2

Correct :thumbsup:

I’d recommend reporting this as an issue to homebrew/science. It may be those options aren’t compatible.


(Saulspatz) #3

I reported it at https://github.com/Homebrew/homebrew-science/issues/4821, but there’s been no response. Is there some other action you’d recommend?


(Mike McQuaid) #4

Just wait, probably. Sorry!