# DuckDB load problem

**URL:** https://discourse.julialang.org/t/duckdb-load-problem/124467
**Category:** Data
**Tags:** package, duckdb
**Created:** [January 6, 2025, 1:42pm UTC](https://discourse.julialang.org/t/duckdb-load-problem/124467 "2025-01-06T13:42:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)
#### Post date: [January 6, 2025, 1:42pm UTC](https://discourse.julialang.org/t/duckdb-load-problem/124467/1 "2025-01-06T13:42:59Z")

</div>

I created a new project, with just DuckDB and DBInterface packages. When executing the following code:

```julia
using DuckDB

# create a new in-memory database
con = DBInterface.connect(DuckDB.DB, ":memory:")

```

fails with the following error:

```julia
ERROR: could not load symbol "duckdb_create_config":
The specified procedure could not be found. 
Stacktrace:
 [1] duckdb_create_config
   @ C:\Users\kobus.herbst\.julia\packages\DuckDB\8Gvy6\src\api.jl:98 [inlined]
 [2] Config
   @ C:\Users\kobus.herbst\.julia\packages\DuckDB\8Gvy6\src\config.jl:9 [inlined]
 [3] DB
   @ C:\Users\kobus.herbst\.julia\packages\DuckDB\8Gvy6\src\database.jl:90 [inlined]
 [4] connect(::Type{DuckDB.DB}, f::String)
   @ DuckDB C:\Users\kobus.herbst\.julia\packages\DuckDB\8Gvy6\src\database.jl:105
 [5] top-level scope
   @ c:\Users\kobus.herbst\repos\TestDuckDB\test.jl:4

```

versioninfo()

```julia
Julia Version 1.11.2
Commit 5e9a32e7af (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 25 × Intel Xeon Processor (Cascadelake)
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, cascadelake)
Threads: 25 default, 0 interactive, 12 GC (on 25 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 25

```

pkg\> st --manifest

```julia
Status `C:\Users\kobus.herbst\repos\TestDuckDB\Manifest.toml`
  [c3b6d118] BitIntegers v0.3.2
  [a10d1c49] DBInterface v2.6.1
  [9a962f9c] DataAPI v1.16.0
  [e2d170a0] DataValueInterfaces v1.0.0
  [d2f5444f] DuckDB v1.1.0
  [fb4d412d] FixedPointDecimals v0.5.3
  [842dd82b] InlineStrings v1.4.2
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.7.0
  [bac558e1] OrderedCollections v1.7.0
  [69de0a69] Parsers v2.8.1
  [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.4.3
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.12.0
  [ea10d353] WeakRefStrings v1.4.2
  [2cbbab25] DuckDB_jll v1.1.2+0
  [56f22d72] Artifacts v1.11.0
  [ade2ca70] Dates v1.11.0
  [8f399da3] Libdl v1.11.0
  [de0858da] Printf v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v0.7.0
  [fa267f1f] TOML v1.0.3
  [cf7118a7] UUIDs v1.11.0
  [4ec0a83e] Unicode v1.11.0

```

How can I fix this?

Thank you.

---

<div class="post-metadata">

### Author: ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)
#### Post date: [January 7, 2025, 6:12am UTC](https://discourse.julialang.org/t/duckdb-load-problem/124467/2 "2025-01-07T06:12:15Z")

</div>

I have located the problem to this part of DuckDB julia connector’s api.jl:

```julia
if "JULIA_DUCKDB_LIBRARY" in keys(ENV)
    libduckdb = ENV["JULIA_DUCKDB_LIBRARY"]
else
    using DuckDB_jll
end

```

because it looks like libduckdb can’t be found or doesn’t contain ‘duckdb\_create\_config’, but I don’t know how to fix this problem. I have taken the extreme measure of completely uninstalling and re-installing julia (also deleting my .julia folder) with no success. Installing DuckDB in the base julia environment also leads to the same precompilation error.

---

<div class="post-metadata">

### Author: ![HanD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hand/32/213908_2.png) [@HanD](https://discourse.julialang.org/u/HanD)
#### Post date: [January 7, 2025, 9:03am UTC](https://discourse.julialang.org/t/duckdb-load-problem/124467/3 "2025-01-07T09:03:13Z")

</div>

Hello!

I have tried this on a Debian Linux, and it works as expected. I’m thinking that this could be an issue specific to Windows. There seem to be similar issues with DuckDB 1.1 on Windows, [this issue](https://github.com/duckdb/duckdb/issues/13911) might be worth checking out. Perhaps [this](https://github.com/duckdb/duckdb/issues/13911#issuecomment-2411846873) could help?

---

<div class="post-metadata">

### Author: ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)
#### Post date: [January 7, 2025, 11:01am UTC](https://discourse.julialang.org/t/duckdb-load-problem/124467/4 "2025-01-07T11:01:33Z")

</div>

Thank you that resolved my problem. There is another weirdness due to problems with the DuckDB\_jll wrapper for the DuckDB library, which is solved by manually downloading the library and pointing to it with the `ENV["JULIA_DUCKDB_LIBRARY"] ` variable:  
In a Julia application that uses fairly complex sql I noticed spurious and incorrect results, which was solved by pointing manually to the library. This problem happened on MacOs, but not Unix.
