我运行"sudo pip install psycopg2",我得到一堆看起来像的输出
cc -DNDEBUG -g -fwrapv -Os .....
.....
cc -DNDEBUG -g -fwrapv -Os .....
.....
Run Code Online (Sandbox Code Playgroud)
最后它说:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/bz/pvj1g9xj16d10pjjgbrfl3fw0000gn/T/pip_build_root/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bz/pvj1g9xj16d10pjjgbrfl3fw0000gn/T/pip-uE3thn-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/bz/pvj1g9xj16d10pjjgbrfl3fw0000gn/T/pip_build_root/psycopg2
Storing debug log for failure in /Users/Tyler/Library/Logs/pip.log …Run Code Online (Sandbox Code Playgroud) 我尝试克隆这个仓库并运行bundle install.捆绑过程失败并抛出此错误:
...
Installing nokogiri 1.6.2.1 with native extensions
Building nokogiri using packaged libraries.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/zulhilmizainudin/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20151130-43880-pntnc6.rb extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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 …Run Code Online (Sandbox Code Playgroud) 我尝试安装宝石' sinatra-websocket ',但是当我跑步时gem install sinatra-websocket,我收到了这个错误......
ERROR: Failed to build gem native extension
... 随着 ...
C:/Ruby193/bin/ruby.exe extconf.rb
checking for main() in -lc... *** 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=C:/Ruby193/bin/ruby
--with-thin_parser-dir
--without-thin_parser-dir
--with-thin_parser-include
--without-thin_parser-include=${thin_parser-dir}/include
--with-thin_parser-lib
--without-thin_parser-lib=${thin_parser-dir}/lib
--with-clib
--without-clib
C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装mysql2(版本0.4.5),我正在使用Rails 5.0.2,Ruby 2.3.1
我已经使用自制软件(版本8.0.11)安装了mysql服务器并启动了mysql:
brew install mysql
brew services start mysql
Run Code Online (Sandbox Code Playgroud)
Gemfile.rb
gem 'mysql2'
Run Code Online (Sandbox Code Playgroud)
当我尝试安装gem mysql2时,我收到以下错误
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
creating Makefile
current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
make "DESTDIR=" clean
current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2
make "DESTDIR="
compiling client.c
In file included from client.c:1:
In file included from ./mysql2_ext.h:41:
./result.h:24:3: error: unknown type name 'my_bool'
my_bool *is_null;
^
./result.h:25:3: error: unknown type name 'my_bool'
my_bool *error;
^
client.c:507:3: error: use of undeclared identifier …Run Code Online (Sandbox Code Playgroud) 我知道这个问题有很多例子。我已经完成了这些答案中的所有内容,但 4 小时后却一无所获。
我正在尝试在 Catalina 10.15.7 上安装 gem 并获得非常流行的
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
Run Code Online (Sandbox Code Playgroud)
有了这个额外的背景
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /Users/bmanica/.chefdk/gem/ruby/2.4.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200925-10024-qilctf.rb extconf.rb --with-cflags\=-save-temps\=obj\ -o\ tmp/a.o
Run Code Online (Sandbox Code Playgroud)
通过调用安装时
gem install ffi -- --with-cflags="-save-temps=obj -o tmp/a.o"
Run Code Online (Sandbox Code Playgroud)
绕过 Catalina 严格的权限规则。
我刚刚下载了 XCode 和命令行工具:
> xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to …Run Code Online (Sandbox Code Playgroud) 我对MacOS环境还很陌生,以前在编译C脚本时遇到一些问题。我有以下问题:
fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
我尝试重新安装,xcode-select --install但一直告诉我
xcode-select:错误:命令行工具已经安装,请使用“软件更新”来安装更新
我什么都没更新。显然是因为我没有/usr/includes文件。我找到了一种使用来编译软件的方法
/Library/Developer/CommandLineTools/usr/bin/g++ XXXX.cpp
不过,现在我想./compile和make其他软件,但我不知道如何在默认情况下使用该GCC解释。当我尝试./configure时出现此错误
配置:错误:无法运行C编译程序。如果您打算交叉编译,请使用'--host'。有关更多详细信息,请参见“ config.log”
所以当我调查config.log:
configure:3224: checking for gcc
configure:3240: found /usr/local/bin/gcc
configure:3251: result: gcc
configure:3282: checking for C compiler version
configure:3291: gcc --version >&5
gcc (GCC) 4.9.2 20141029 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; …Run Code Online (Sandbox Code Playgroud) 我目前使用的是 Mac OSX Big Sur 11.2.3。每当我运行命令时:
g++-10 -o project0 project0.cpp -lm -fopenmp
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
clang: error: invalid version number in '-mmacosx-version-min=11.2'
Run Code Online (Sandbox Code Playgroud)
我意识到这可能是由于我使用的是 Big Sur 11.2.3,但我被告知这不应该成为问题。我已经尝试了很多事情,例如重新安装 gccbrew install gcc等等,但都无济于事。此时,我非常不确定该怎么办。任何帮助将非常感激!
我正在使用python3.7.2和pip 19.2.2用于 python 应用程序。问题是我无法psycopg2 2.8.3在 MacOS 上安装依赖项。
以下是我在运行时遇到的错误pip install psycopg2:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Run Code Online (Sandbox Code Playgroud)
似乎ssl没有安装所以我尝试安装pip install sssl但出现此错误:
ERROR: Command errored out with exit status 1:
command: /Users/joey/.pyenv/versions/3.7.2/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9c/fcm6pxnj39b1t777zpcfpbdh0000gn/T/pip-install-2ldzdiz0/ssl/setup.py'"'"'; __file__='"'"'/private/var/folders/9c/fcm6pxnj39b1t777zpcfpbdh0000gn/T/pip-install-2ldzdiz0/ssl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装 Docker Desktop,但在安装的最后一步出现以下错误:
我有一台配备 M1 芯片和操作系统 Ventura 13.2.1 的 Mackbook。
我已经尝试使用 homebrew cask 安装,但这不起作用,所以我转而尝试从网站下载: https: //docs.docker.com/desktop/install/mac-install/,这就是给了我错误。我可以下载并运行安装程序。我可以一直进行到最后一步,在推荐设置或高级设置(手动设置)之间进行选择。当我选择任一选项并点击“提交”时,我收到此错误。
注意:我没有 Rosetta 2,无法将其安装在此设备上。
Error invoking remote method 'desktop-go-backend':
Error: {"message":"<nil>: installing vmnetd: retrieving vmnetd version from
/Library/LaunchDaemons/com.docker.vmnetd.plist: reading plist
/Library/LaunchDaemons/com.docker.vmnetd.plist:
open /Library/LaunchDaemons/com.docker.vmnetd.plist:
no such file or
directory
\ngithub.com/docker/pinata/mac/tools/install/privileged.getValueFromPlist\n\tgithub.com/docker/pinata/mac/tools/install/privileged/vmnetd.go:175\ngithub.com/docker/pinata/mac/tools/install/privileged.setupVmnetd\n\tgithub.com/docker/pinata/mac/tools/install/privileged/vmnetd.go:85\ngithub.com/docker/pinata/mac/tools/install/privileged.ApplyCustomConfiguration\n\tgithub.com/docker/pinata/mac/tools/install/privileged/privileged.go:137\ngithub.com/docker/pinata/mac/tools/install/privileged.ConfigCmd.func1\n\tgithub.com/docker/pinata/mac/tools/install/privileged/privileged.go:59\ngithub.com/spf13/cobra.
(*Command).execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:916\ngithub.com/spf13/cobra.
(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.
(*Command).Execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:968\nmain.main\n\tgithub.com/docker/pinata/mac/tools/install/main.go:185\nruntime.main\n\truntime/proc.go:250\nruntime.goexit\n\truntime/asm_arm64.s:1172\ngithub.com/docker/pinata/mac/tools/install/privileged.setupVmnetd\n\tgithub.com/docker/pinata/mac/tools/install/privileged/vmnetd.go:87\ngithub.com/docker/pinata/mac/tools/install/privileged.ApplyCustomConfiguration\n\tgithub.com/docker/pinata/mac/tools/install/privileged/privileged.go:137\ngithub.com/docker/pinata/mac/tools/install/privileged.ConfigCmd.func1\n\tgithub.com/docker/pinata/mac/tools/install/privileged/privileged.go:59\ngithub.com/spf13/cobra.
(*Command).execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:916\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.
(*Command).Execute\n\tgithub.com/spf13/cobra@v1.6.1/command.go:968\nmain.main\n\tgithub.com/docker/pinata/mac/tools/install/main.go:185\nruntime.main\n\truntime/proc.go:250\nruntime.goexit\n\truntime/asm_arm64.s:1172"}
Run Code Online (Sandbox Code Playgroud)