我正在使用homebrew来编译/安装 Mac 命令行工具。它使用 ruby 来实现,每当我使用 时homebrew install SOMETHING,我都会收到warning: Insecure world writable dir .../osx/bin in PATH, mode 040777警告。bin目录的权限为777。为什么会出现这个警告,如何删除它们?
我安装了Sphinx
brew install sphinx
Run Code Online (Sandbox Code Playgroud)
但是当我打电话时sphinx-quickstart,会发生这样的事情:
cls ~/workspace/SphinxTest $ sphinx-quickstart
-bash: /usr/local/share/python3/sphinx-quickstart: /usr/local/Cellar/python3/3.2.3/Frameworks/Python.framework/Versions/3.2/Resou: bad interpreter: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我当前的版本python3是 Python 3.3.0,位于/usr/local/Cellar/python3/3.3.0. 我之前还安装了 Python 3.2.3,但在自制软件清理过程中被卸载了。为什么 homebrew 仍然尝试使用已卸载的 Python 3 版本?我怎样才能得到一个可用的狮身人面像?
尝试使用brew 在我的Mac 上安装更新版本的bash。酿造已安装并且工作正常。当我尝试运行:brew install bash 但是出现以下错误:
==> Downloading https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2a
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "readline--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
Run Code Online (Sandbox Code Playgroud)
事实上,这里什么也没有:
https://gist.githubusercontent.com/jacknagel
Run Code Online (Sandbox Code Playgroud) Traceback (most recent call last):
File "/Applications/MAMP/htdocs/Minor Project/xyz.py", line 5, in <module>
import config
File "/Applications/MAMP/htdocs/Minor Project/config.py", line 5, in <module>
import MySQLdb
File "/Users/brijeshlakkad/Library/Python/2.7/lib/python/site-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(/Users/brijeshlakkad/Library/Python/2.7/lib/python/site-packages/_mysql.so, 2): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.21.dylib
Referenced from: /Users/brijeshlakkad/Library/Python/2.7/lib/python/site-packages/_mysql.so
**Reason: image not found**
Run Code Online (Sandbox Code Playgroud)
当我使用“ brew install mysql ”安装mysql时,文件将被执行。当我执行brew install mysql时,有两个不同的mysql都单独运行。我执行了这个文件,然后所有数据都存储在与phpmyadmin mysql不同的本地 mysql中。
我在我的 Mac 上为 Android Studio 安装了 JDK(我之前已经这样做过),并使用 Homebrew 进行安装。完成后我得到了这些建议?我想知道我是否希望系统 Java 包装器找到 JDK,我应该对其进行符号链接吗?以及为什么我会首先想要它?另外,我正在使用 .zshrc,因为它现在是默认的 Catalina,并且想知道我是否以相同的方式设置 $PATH 变量?
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
openjdk is keg-only, which means it was not symlinked into /usr/local,
because it shadows the macOS `java` wrapper.
If you need to have openjdk first in your PATH run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.zshrc
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"```
Run Code Online (Sandbox Code Playgroud) 我有 MacOs Catalina 版本 10.15.5,我按照他们网站https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ 上指示的步骤使用 Homebrew安装了 mongoDB 。当我检查我的 mongoDB 是否正确安装时,我使用which mongo命令并得到/usr/local/bin/mongo响应。当我使用时mongo --version,mongod --version我得到:
MongoDB shell version v4.2.7
git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
Run Code Online (Sandbox Code Playgroud)
和
db version v4.2.7
git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
Run Code Online (Sandbox Code Playgroud)
我认为这意味着它正确安装并且应该可以工作。
但是当我打开终端并brew services start mongodb-community@4.2按照网站上的指示运行命令时,我得到:
Error: undefined method `resolve_alias' for Formula:Class
/usr/local/bin/brew-services.rb:154:in `service'
/usr/local/bin/brew-services.rb:203:in `check'
/usr/local/bin/brew-services.rb:193:in `run!'
/usr/local/bin/brew-services.rb:397:in `<top (required)>' …Run Code Online (Sandbox Code Playgroud) 我最近重置了我的 mac。Rails 不会安装我输入
sudo gem install rails
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby extconf.rb
checking for unistd.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.
> Check the mkmf.log file for more details.
You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': …Run Code Online (Sandbox Code Playgroud) 有没有办法减少 homebrew-cask 和 homebrew-core 文件夹的大小?它们分别为 230.7 MB 和 346.5 MB。
另外,brew cleanup并没有做很多事情,二进制文件仍然存在于 ~/Library/Caches/Homebrew/downloads 文件夹中,这是设计使然吗?
我一直在尝试使用以下命令在 MacOS 上构建 sqlcipher3:
git clone https://github.com/coleifer/sqlcipher3 && cd sqlcipher3
python3 setup.py build
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
$ python3 setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
copying sqlcipher3/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
copying sqlcipher3/dbapi2.py -> build/lib.macosx-10.14-x86_64-3.7/sqlcipher3
running build_ext
Builds a C extension linking against libsqlcipher library
building 'sqlcipher3._sqlite3' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/src
xcrun -sdk macosx clang -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Qunused-arguments -DMODULE_NAME="sqlcipher3.dbapi2" -I/usr/include -I/Users/gab/Downloads/testbuild/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7m -c src/module.c -o build/temp.macosx-10.14-x86_64-3.7/src/module.o
In file included from src/module.c:24:
src/connection.h:34:10: fatal …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用brew install sourcery命令,但出现zsh: command not found: brew error!
我使用以下命令安装了自制软件:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Run Code Online (Sandbox Code Playgroud)
有什么办法可以解决M1芯片Macbook上的这个问题吗?