我在Windows 10上安装了Julia v0.6.2。 安装了所有其他软件包没有问题,但Mongo.jl在构建它时给了我这个错误。
Pkg.build("Mongo")
INFO: Building LibBSON
===============================[ ERROR: LibBSON ]===============================
LoadError: None of the selected providers can install dependency libbson.
Use BinDeps.debug(package_name) to see available providers
while loading C:\Users\"user"\.julia\v0.6\LibBSON\deps\build.jl, in expression starting on line 27
================================================================================
INFO: Building Mongo
================================[ ERROR: Mongo ]================================
LoadError: None of the selected providers can install dependency libmongoc.
Use BinDeps.debug(package_name) to see available providers
while loading C:\Users\"user"\.julia\v0.6\Mongo\deps\build.jl, in expression starting on line 26
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: LibBSON and Mongo had build errors.
- packages with build errors remain installed in C:\Users\ciko9\.julia\v0.6
- build the package(s) and all dependencies with Pkg.build("LibBSON", "Mongo")
- build a single package by running its deps/build.jl script
================================================================================
我已经开了一个issue on github,但我想尽快修复它。关于如何解决这个问题的任何想法?
答案 0 :(得分:0)
解决方案是首先手动安装mongo c驱动程序。 其次,将mongo-c-drivers文件夹复制到julia里面的mongo e libbson文件夹中,然后为每个包创建一个新文件deps.jl并写下:
# Macro to load a library
macro checked_lib(libname, path)
((VERSION >= v"0.4.0-dev+3844" ? Base.Libdl.dlopen_e : Base.dlopen_e)(path) == C_NULL) && error("Unable to load \n\n$libname ($path)\n\nPlease re-run Pkg.build(package), and restart Julia.")
quote const $(esc(libname)) = $path end
end
# Load dependencies
@checked_lib libbson "C:\\Users\\"userName"\\.julia\\v0.6\\LibBSON\\mongo-c-driver\\bin\\libbson-1.0.dll"
# Load-hooks