我正在尝试将Swift应用程序部署到Heroku。我正在使用Swift 5.0.2和Heroku Stack18。此应用程序以前曾在Swift 3.0和Heroku Stack 16中使用。
我不确定这个错误到底在告诉我什么,所以我不太知道从哪里开始修复它。我使用的是Heroku构建包的分支,因为它甚至不支持自己的Stack 18。https://github.com/onuniverse/heroku-buildpack-swift
2019-07-19T00:25:55.906961+00:00 heroku[web.1]: State changed from crashed to starting
2019-07-19T00:25:57.109052+00:00 heroku[web.1]: Starting process with command `Unibot --bind 0.0.0.0:58139`
2019-07-19T00:25:58.829639+00:00 heroku[web.1]: State changed from starting to crashed
2019-07-19T00:25:58.761232+00:00 app[web.1]: Unibot: error while loading shared libraries: libicui18nswift.so.61: cannot open shared object file: No such file or directory
答案 0 :(得分:1)
Unibot: error while loading shared libraries: libicui18nswift.so.61:
cannot open shared object file: No such file or directory
日志的最后一行表明,您使用的buildpack不能正确地从Swift工具链中复制所有共享库,或者是因为它正在寻找预定义的库名,或者没有考虑符号链接-这是Swift引入的5.0。
我建议再次尝试使用vapor/vapor
buildpack(可作为源here使用),该软件包支持Swift 5.0.2和开箱即用的heroku-18堆栈。
尽管其名称,它不包含任何特定于Vapor的内容,并且可以与任何Swift项目一起使用。