我正在尝试启动Swift Vapor项目.按照这里的指南,似乎Homebrew是唯一的选择.我已经拥有MacPorts,并且在许多方面更喜欢自制软件.不幸的是没有Vapor的端口,所以我选择了Vapor人在这里描述的SPM安装.我之前在Kitura取得了成功,所以我想为什么不用Vapor.好吧,当你去建立你的项目时,你得到了
$ swift build
[... build stuff ...]
note: you may be able to install ctls using your system-packager:
brew install ctls
[... more build stuff ...]
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^
[... more like that ...]
/Users/morpheu5/web/vizex/api/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: error: could not build Objective-C module 'CTLS'
import CTLS
^
<unknown>:0: error: build had 1 command failures
error: exit(1):/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/morpheu5/web/vizex/api/.build/debug.yaml
Run Code Online (Sandbox Code Playgroud)
显然你真的需要这个ctls包,获得它的唯一方法似乎是通过Homebrew/Tap.
我真的不想要或不需要Homebrew,所以我该如何找到它的底部?我真的很想试试Vapor.
强制性1:安装Homebrew是最简单的方法.如果你然后决定你不想要Homebrew,它会非常整齐地卸载.
强制性2:使用Linux VM是第二种最简单的方法.
但要回答您的问题并手动安装CTLS:
确保您拥有LibreSSL或OpenSSL安装了库(可能使用MacPorts)
下载最新版本的CTLS.
从发布存档中,重命名macos.pc为ctls.pc,然后使用文本编辑器对其进行编辑.更改路径以指向LibreSSL/OpenSSL安装.
将编辑内容移动ctls.pc到您的$PKG_CONFIG_PATH.
我已经测试了这个,它对我有用,我LibreSSL使用Homebrew 安装的警告,所以我不知道MacPorts会把它放在哪里.
| 归档时间: |
|
| 查看次数: |
616 次 |
| 最近记录: |