homebrew

How can I implement install-or-upgrade for brew recipes?

别等时光非礼了梦想. 提交于 2019-12-24 00:24:00
问题 I want to install a brew recipe or upgrade it if is already installed using bash. The command is supposed to return a non zero exit code only if at the end the recipe is not installed. PS. One should remark the brew install xxx return error code if xxx is already installed. 回答1: Background: https://github.com/Homebrew/legacy-homebrew/issues/30939 I just needed this also. This seems to work. #!/usr/bin/env bash package=$1 pkg_installed=false pkg_updated=false verbose=true # TODO: ensure valid

xcode-select command not found

眉间皱痕 提交于 2019-12-23 21:45:54
问题 I was trying to install homebrew on my mac but failed with the error message saying that xcode-select command not found. I did some searchings online and realized that there is one duplication online. However, it doens't provide me a solution. Below is the information about my environment and settings. I have xcode5.1.1 and xcode6beta6 both installed on the osx mavericks. I checked the PATH variable by "echo $PATH" and the result is "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin". I downloaded

brew link jpeg issues

若如初见. 提交于 2019-12-23 17:01:43
问题 I am trying to install opencv on Mac OSX Lion. brew install opencv I get the following error (and a few other similar ones) Error: The linking step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using `brew link jpeg' When I do brew link jpeg Linking /usr/local/Cellar/jpeg/8d... ln: wrjpgcom: File exists I do not understand what this means? What should I be doing? Thanks 回答1: Check for the following files in the /usr/local folder: bin

Error in OpenCV 2.4.2 “OpenCV Error: Bad flag”

拈花ヽ惹草 提交于 2019-12-23 10:37:45
问题 I just started trying to play with OpenCV and I wrote a small program from a book that is pretty simple. The problem is when I try to compile it, I get this error. I will give you all the information I have. I installed openCV using homebrew for Mac OS X 10.7. #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> int main(int argc, char *argv[]) { cv::Mat image = cv::imread("usf.gif"); cv::namedWindow("My Image"); cv::imshow("My Image", image); cv::waitKey(5000); return 1; }

tesseract install mac os

半世苍凉 提交于 2019-12-23 09:56:01
问题 I am trying to install tesseract on my mac using homeBrew. When I try installing, everything seems to be good but I get the following error/message: Warning: Could not link leptonica. Unlinking... Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using `brew link leptonica' When I try running a tesseract function, I get the following error: Tesseract Open Source OCR Engine v3.02.02 with Leptonica Error in

PostGIS Homebrew installation referencing an old path?

元气小坏坏 提交于 2019-12-23 08:29:20
问题 I upgraded and subsequently reinstalled PostGIS & PostgreSQL on OS X Mountain Lion. When trying to use the PostGIS extensions, I receive the following error: ERROR: could not open extension control file "/usr/local/Cellar/postgresql/ 9.2.3/share/postgresql/extension/postgis.control": No such file or directory It appears that PostGIS (and PostgreSQL as well??) are still looking for the required files in the /postgresql/9.2.3/ directory and not in the /postgresql/9.2.4/ directory. I have used

Conda command fails silently

北战南征 提交于 2019-12-23 07:06:44
问题 My anaconda is behaving oddly. conda list , conda debug , conda install , all return nothing . I have already reinstalled anaconda2 , checked my path on .profile , and it's all there. 1. which -a conda /Users/me/anaconda2/bin/conda 2. echo $PATH /Users/me/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin 3. ~/.profile : # added by Anaconda2 5.0.1 installer export PATH="/Users/me/anaconda2/bin:$PATH" 4. brew doctor : Warning: "config" scripts exist

Kernel Error in R Jupyter Notebook due to Anaconda?

梦想的初衷 提交于 2019-12-23 05:02:32
问题 I need to bundle R scripts into some Notebook such as Jupyter Notebook. My OSX setup contains Homebrew, Rstudio and Anaconda. Next I try to get R in Jupyter Notebook working. I am getting the following error FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Cellar/r/3.3.3_1/R.framework/Resources/bin/R': '/usr/local/Cellar/r/3.3.3_1/R.framework/Resources/bin/R' that shows that paths are somehow messed up. Also, the Jupyter Notebook shows Kernel Error in Red. The path /Users

Delete all virtualenv and start from scratch

前提是你 提交于 2019-12-23 04:44:47
问题 I used to use macport and recently switch to homebrew. After cleaning up all the macports enviornments using python version installed by homebrew I did pip install virtualenv. $virtualenv test --no-site-packages Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 5, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module> working_set.require(__requires

Error message for virtualenvwrapper installed with homebrew on Mac Sierra

狂风中的少年 提交于 2019-12-23 04:19:35
问题 I installed virtualenv and virtualenvwrapper using homebrew, but am getting the following error when I try source virtualenvwrapper.sh Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Library/Frameworks/Python.framework