我在尝试使用Perfect-HTTPServer
和Perfect-MongoDB
软件包依赖项构建swift应用程序时遇到这些错误
Compile Swift Module 'MongoDB' (7 sources)
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "/usr/local/include/libmongoc-1.0/mongoc.h"
^
/usr/local/include/libmongoc-1.0/mongoc.h:22:10: error: 'bson.h' file not found
#include <bson.h>
^
/root/mobile-backend/Packages/MongoDB-2.0.8/Sources/MongoDB/MongoGridFS.swift:20:8: error: could not build Objective-C module 'libmongoc'
import libmongoc
^
<unknown>:0: error: build had 1 command failures
安装了libbson
和libmongoc
:
~# apt-get install libmongoc-dev libbson-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libbson-dev is already the newest version (1.3.1-1).
libmongoc-dev is already the newest version (1.3.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我确保按照Perfect-MongoDB上的说明将它们符号链接到该位置:
~# ls -l /usr/local/include
total 0
lrwxrwxrwx 1 root root 24 Mar 20 17:05 libbson-1.0 -> /usr/include/libbson-1.0
lrwxrwxrwx 1 root root 26 Mar 20 17:00 libmongoc-1.0 -> /usr/include/libmongoc-1.0
答案 0 :(得分:1)
好的,here我找到了perfect
这个为我修复错误的神奇依赖列表。我不确定那些丢失的软件包导致了什么问题,但它现在有效。
# apt-get install clang pkg-config libicu-dev libpython2.7 libxml2-dev wget git libssl-dev uuid-dev libsqlite3-dev libpq-dev libmysqlclient-dev libbson-dev libmongoc-dev libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1).
libbson-dev is already the newest version (1.3.1-1).
libmongoc-dev is already the newest version (1.3.1-1).
libicu-dev is already the newest version (55.1-7ubuntu0.1).
libpython2.7 is already the newest version (2.7.12-1ubuntu0~16.04.1).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.6).
uuid-dev is already the newest version (2.27.1-6ubuntu3.2).
wget is already the newest version (1.17.1-1ubuntu1.1).
clang is already the newest version (1:3.8-33ubuntu3.1).
The following additional packages will be installed:
build-essential comerr-dev cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 krb5-multidev libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libcc1-0
libdpkg-perl libfakeroot libfile-fcntllock-perl libgssrpc4 libisl15 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libmpc3 libmysqlclient20 libpq5 make mysql-common
Suggested packages:
doc-base cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake libtool flex bison gdb gcc-doc
gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
krb5-doc libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev krb5-user postgresql-doc-9.5 sqlite3-doc make-doc
The following NEW packages will be installed:
build-essential comerr-dev cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 krb5-multidev libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libcc1-0
libcurl4-openssl-dev libdpkg-perl libfakeroot libfile-fcntllock-perl libgssrpc4 libisl15 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libmpc3 libmysqlclient-dev
libmysqlclient20 libpq-dev libpq5 libsqlite3-dev libxml2-dev make mysql-common pkg-config
0 upgraded, 34 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.4 MB of archives.
After this operation, 97.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y