首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >蒸气生成错误:清单解析错误

问蒸气生成错误:清单解析错误
EN

Stack Overflow用户
提问于 2018-04-02 18:32:07
回答 3查看 1.7K关注 0票数 2

macOS山高度10.13.4

Xcode版本9.3

代码语言:javascript
复制
$ swift --version
Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Target: x86_64-apple-darwin17.5.0

$ brew info vapor
vapor/tap/vapor: stable 3.1.4.l
https://vapor.codes
/usr/local/Cellar/vapor/3.1.4.l (4 files, 17.0MB) *
  Built from source on 2018-04-01 at 23:55:47
From: https://github.com/vapor/homebrew-tap/blob/master/vapor.rb
==> Dependencies
Required: ctls ✔, libressl ✔

$ eval "$(curl -sL check.vapor.sh)"
✅  Xcode 9 is compatible with Vapor 2.
✅  Xcode 9 is compatible with Vapor 3.
✅  Swift 4.1 is compatible with Vapor 2.
✅  Swift 4.1 is compatible with Vapor 3.

$ vapor version
Vapor Toolbox: 3.1.4

我创建新项目时:

代码语言:javascript
复制
vapor new Hello --template=api

当我试图建造它时:

代码语言:javascript
复制
vapor build --verbose

我知道错误:

代码语言:javascript
复制
No .build folder, fetch may take a while...
Fetching Dependencies ...
warning: 'fetch' command is deprecated; use 'resolve' instead
/PATH-TO-PROJECT: error: manifest parse error(s):
<module-includes>:5:9: note: in file included from <module-includes>:5:
#import "copyfile.h"
        ^      
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/copyfile.h:36:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develo. per/SDKs/MacOSX10.13.sdk
/usr/include/copyfile.h:36:
#include <stdint.h>
         ^
/usr/local/include/stdint.h:59:11: note: in file included from /usr/local/include/stdint.h:59:
# include <stdint.h>
          ^
/usr/local/include/stdbool.h:4:10: note: in file included from /usr/local/include/stdbool.h:4:
#include <stdbool.h>
         ^

<unknown>:0: error: could not build Objective-C module 'Darwin'
Building Project [Failed]
Error: execute(1)

有人知道那里出了什么问题吗?提前感谢!

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2018-04-03 19:01:02

我找到了解决办法:

代码语言:javascript
复制
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/base.h
  /usr/local/include/bcj.h
  /usr/local/include/block.h
  /usr/local/include/cdefs.h
  /usr/local/include/check.h
  ...

并通过删除/usr/local/include/中的所有“未酿造的头文件”来解决问题。

票数 1
EN

Stack Overflow用户

发布于 2018-04-03 17:51:54

太奇怪了!就为了确认你在正确的文件夹里?如果你运行swift build,它会做同样的事情吗?

票数 0
EN

Stack Overflow用户

发布于 2018-10-13 19:15:21

我有一个与brew无关的类似问题。

错误:backgroundExecute(代码: 1,错误:"/path/to/project: Error:清单解析错误:\n无效版本字符串: x.0.0\n",输出:"")

我的包裹文件是这样的;

代码语言:javascript
复制
...
.package(url: "https://github.com/../something.git", .upToNextMajor(from: "x.0.0")),
...

在查看.upToNextMajor(from:)时,我没有看到“x”的任何解析,所以我只浏览了github页面,找到了我想要的主要版本,并将其替换为包文件中的占位符:

代码语言:javascript
复制
...
.package(url: "https://github.com/../something.git", .upToNextMajor(from: "1.0.0")),
...

这为我解决了问题,希望这能帮助下一个经过的人!如果这对你有帮助的话,那就投票吧!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49616734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档