我正在使用MacOS X 10.7.5,由于握手失败,我需要更新的OpenSSL版本.互联网上有几个教程,我尝试了以下内容:
brew install openssl
brew link openssl --force
Run Code Online (Sandbox Code Playgroud)
然而,它不起作用:
openssl version
OpenSSL 0.9.8r 8 Feb 2011
brew unlink openssl && brew link openssl --force
Unlinking /usr/local/Cellar/openssl/1.0.1e... 1139 links removed
Linking /usr/local/Cellar/openssl/1.0.1e... 1139 symlinks created
Run Code Online (Sandbox Code Playgroud)
SVN问题也未解决.有任何想法吗?我宁愿不尝试MacPorts方式,因为它可能会干扰Homebrew.
我想在编译时在Mac OSX下设置可执行文件的运行时路径(对于链接器),这样在程序启动时动态链接器可以找到非标准位置的共享库.
在Linux下,可以使用-Xlinker -rpath -Xlinker /path/to(或使用-Wl,-rpath,/path/to),在Solaris下,您可以添加-R/path/to到编译器命令行.
我发现一些信息,Mac OS X gcc自10.5以来就支持-rpath,即自2008年以来.
我尝试用最小的例子来实现它 - 没有成功:
$ cat blah.c
int blah(int b)
{
return b+1;
}
Run Code Online (Sandbox Code Playgroud)
和:
$ cat main.c
#include <stdio.h>
int blah(int);
int main ()
{
printf("%d\n", blah(22));
return 0;
}
Run Code Online (Sandbox Code Playgroud)
编译它像这样:
$ gcc -c blah.c
$ gcc -dynamiclib blah.o -o libblah.dylib
$ gcc main.c -lblah -L`pwd` -Xlinker -rpath -Xlinker `pwd`/t
Run Code Online (Sandbox Code Playgroud)
现在测试:
$ mkdir t
$ mv libblah.dylib t
$ ./a.out
dyld: Library …Run Code Online (Sandbox Code Playgroud) 如何在mac上安装gettext?
我在我的一个php页面上收到此错误:
Fatal error: Call to undefined function bindtextdomain()
Run Code Online (Sandbox Code Playgroud)
这是因为我没有安装gettext.
我找不到有关如何安装它的良好说明.我尝试过使用:
brew install gettext
Run Code Online (Sandbox Code Playgroud)
它把一些文件放在这里:
/usr/local/Cellar/gettext/0.18.2
但我不知道该怎么做.
更新:现在我没有尝试使用自制软件,而是尝试使用自制软件:
用wget下载
cd ~/Downloads
wget http://ftp.gnu.org/gnu/gettext/gettext-0.18.2.tar.gz
tar -zxvf gettext-0.18.2.tar.gz
cd gettext-0.18.2
./configure
make
Run Code Online (Sandbox Code Playgroud)
make check是可选的,用于运行自检
make check
Run Code Online (Sandbox Code Playgroud)
我得到的错误:
make [3]:***[check-TESTS]错误1
make [2]:***[check-am]错误2
make [1]:***[check-recursive]错误1
sudo make install
Run Code Online (Sandbox Code Playgroud)
它安装在这里:/ usr/local/share/gettext
这里的文档:/ usr/local/share/doc/gettext
但是如何让我的php页面能够使用gettext和bindtextdomain()函数?
如何解决我在Vapor 2中遇到的这些OpenSSL/TLS问题?他们阻止我在命令行和Xcode中编译我的项目.
在SPM构建期间:
note: you may be able to install ctls using your system-packager:
brew install ctls
note: you may be able to install ctls using your system-packager:
brew install openssl
Run Code Online (Sandbox Code Playgroud)
SPM构建失败后:
Linking ./.build/debug/Run
ld: library not found for -lcrypto for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-07-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Desktop/PackageConfig/.build/debug.yaml
Run Code Online (Sandbox Code Playgroud)
同样在SPM中:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^ …Run Code Online (Sandbox Code Playgroud) 我已尽一切可能安装 eo-learn 但它无法使用 Conda 无法正常工作我必须使用 pip 使其工作但在尝试安装 numba 时遇到了困难
采取的步骤
brew install llvm
export LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config
LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config pip install numba
LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config pip install llvmlite which is the major dependency breaking for now
brew link llvm
Warning: Refusing to link macOS provided/shadowed software: llvm
If you need to have llvm first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
I have added the flags
brew link -force …Run Code Online (Sandbox Code Playgroud) 我按照.NET Core网站上的说明进行操作,但是出现了此错误.显然有一些预先要求缺失.知道怎么安装那些?
mymac:~ naveen.vijay$ dotnet new
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Crypto' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.CryptoInitializer.EnsureOpenSslInitialized()
at Interop.CryptoInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.Crypto..cctor()
--- End of inner exception stack trace ---
at Interop.Crypto.GetRandomBytes(Byte* buf, Int32 num)
at System.IO.Path.GetCryptoRandomBytes(Byte* bytes, Int32 byteCount)
at …Run Code Online (Sandbox Code Playgroud) 在Python 3.6我得到一个ModuleNotFoundError:
>>> import OpenSSL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'OpenSSL'
Run Code Online (Sandbox Code Playgroud)
Python为什么找不到OpenSSL模块?
我试图在Mac OS 10.12上使用libssl 安装Siege,但是当我对httpsURL 使用实用程序时,出现以下错误。
[错误] HTTPS需要libssl:无法访问https://example.com/ 使用此协议:套接字已连接
我正在从此Wiki使用以下命令进行安装:
./configure --with-ssl
make
make install
Run Code Online (Sandbox Code Playgroud) 我一直收到此错误,我正在运行OS X,PHP71,Apache 2.4,OpenSSL
php -i | grep“ SSL版本”返回SSL版本=> OpenSSL / 1.0.2k
PHP和CURL的安装如下:
$ brew install --with-openssl curl
$ brew install --with-homebrew-curl --with-httpd24 php71
Run Code Online (Sandbox Code Playgroud) 我正在使用编译器尝试生成一组给定的文件,#include 行因错误而中断:致命错误:找不到“openssl/conf.h”文件。
我已经使用brew安装了openssl,但它似乎不起作用。我是否需要以某种方式将 openssl 与我正在使用的文件夹连接?
我使用的是最新的 mac OS Sierra。
我正在尝试根据https://bugs.python.org/issue29095上的说明在macOS 10.11上编译Python 3.6.2 .
我用自制OpenSSL的安装到标准位置,然后加入LDFLAGS,CFLAGS以及CPPFLAGS我ENV:
$ printenv | grep FLAGS
LDFLAGS=/usr/local/Cellar/openssl/1.0.2l/lib/
CFLAGS=-I/usr/local/Cellar/openssl/1.0.2l/include/openssl
CPPFLAGS=-I/usr/local/Cellar/openssl/1.0.2l/include/openssl
Run Code Online (Sandbox Code Playgroud)
然后在同一个shell中,我将Python编译到我的用例所需的自定义位置:
$ sudo ./configure --prefix=/oebuild/python/python-3.6.1
$ sudo make
$ sudo make install
Run Code Online (Sandbox Code Playgroud)
但是,SSL模块无法构建.构建日志说明了这一点:
Python构建成功完成!找不到构建这些可选模块的必要位:_gdbm _ssl ossaudiodev
spwd
要查找必要的位,请在detect_modules()中的setup.py中查找模块的名称.
我正在尝试按照本教程更新OpenSSL
我跑:
brew update && brew upgrade
brew install openssl
brew link --force openssl
sudo ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/bin/openssl
mkdir -p /usr/local/lib
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
Run Code Online (Sandbox Code Playgroud)
当我检查
ls -l /usr/local/opt/openssl
Run Code Online (Sandbox Code Playgroud)
我明白了:
lrwxr-xr-x 1 Filipe admin 24 Apr 29 12:48 /usr/local/opt/openssl -> ../Cellar/openssl/1.0.2k
Run Code Online (Sandbox Code Playgroud)
但是当我跑步时:
openssl version -a
Run Code Online (Sandbox Code Playgroud)
我明白了:
-bash:openssl:找不到命令
我已经重启了终端,但没有改变.