brew的库版本冲突:
I have a few kegs of the same package in /usr/local/Cellar/libfoo
like /usr/local/Cellar/libfoo/1.0.1
, /usr/local/Cellar/libfoo/HEAD
and /usr/local/Cellar/libfoo/mycopy
How can I brew link to a specific version?
问题解决方法:
The usage info:
Usage: brew switch <formula> <version>
Example:
brew switch mysql 5.5.29
You can find the versions installed on your system with info
.
brew info mysql
And to see the available versions to install, you can provide a dud version number, as brew will helpfully respond with the available version numbers:
brew switch mysql 0
Update (15.10.2014):
The brew versions
command has been removed from brew, but, if you do wish to use this command first run brew tap homebrew/boneyard
.
The recommended way to install an old version is to install from the homebrew/versions
repo as follows:
$ brew tap homebrew/versions
$ brew install mysql55
brew 的 link问题
$ brewinstall erlangError: You must `brew link libtool' before erlang can be installedzhi:~ zhi$ brew link libtoolLinking /usr/local/Cellar/libtool/2.4.2... Error: Could not symlink include/ltdl.h/usr/local/include is not writable.
运行brew doctor
,把它报的错先搞定,重复这个过程,直到它不报错为止。
PS.话说上面的出错提示信息不是已经很明显了么?如果你是管理员用户,先跑一下sudo chmod -R g+w /usr/local
You can do:
sudo chown -R whoami /usr/local
brew link libtool
sudo brew install erlang
因为brew在安装文件的时候需要root权限,命令前面加上sudo就好了
命令在回车后会让你输入你当前用户的密码,输入然后回车就行了
如果依然不行,也可能是读写权限问题,看一下相关目录下的读写权限,确定问题出在哪再说
brew link mysql did not complete
For some some reason brew does not link mysql and it complains about permission. I chmod
the folder to 777
but I am still have the same issues
laptop$ brew install mysql
Error:
mysql-5.5.27 already installed, it's just not linked
laptop$ brew link mysql
Linking /usr/local/Cellar/mysql/5.5.27... Warning: Could not link mysql.
Unlinking...
Error:
Could not symlink file: /usr/local/Cellar/mysql/5.5.27/lib/plugin
/usr/local/lib is not writable. You should change its permissions.
解决:
sudo chown -R $(whoami) /usr/local/lib/
编译问题: cannot compute suffix of object files:
configure: error: cannot compute suffix of object files: cannot compile
需要将mpc、gmp和mpfr目录加入到环境变量中,在/etc/profile文件末尾加上:export LD_LIBRARY_PATH =$ LD_LIBRARY_PATH :/usr/local/mpc-0.8.1/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-3.0.0/lib,注意修改目录,之后运行#source /etc/profile使其生效即可
brew link
mac 安装opencv之后的cmake find package 的引用问题
By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenCV", but
CMake did not find one.
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
mac终端使用快捷键,终端中回行首,行尾
在Mac系统中并没有Home、End等键,所以在使用时并不是特别的顺手,但是有几个键位组合可以使Terminal的操作更加灵活方便。
1、将光标移动到行首:ctrl + a
2、将光标移动到行尾:ctrl + e
3、清除屏幕: ctrl + l
4、搜索以前使用命令:ctrl + r
5、清除当前行: ctrl + u
6、清除至当前行尾: ctrl + k
7、单词为单位移动:option + 方向键