Cannot install FTS extension in DuckDB

According to Readme · DuckDB.jl (juliahub.com) you’d probably have to delete the cached DuckDB folders in .julia/compiled/v1.10/ (or your version of Julia) before adding the package again, so the package gets recompiled with the version of DuckDB that you have pointed to with your environment variable

I got extensions to work on Windows now by doing the following:

  1. Open PowerShell on Windows and set the environment variable like so:

$Env:JULIA_DUCKDB_LIBRARY=“path/to/duckdb.dll”

  1. Run julia.exe from the same Shell instance
  2. Delete DuckDB and DuckDB_jll folders from .julia/compiled/v1.10/
  3. From the Julia repl running in PowerShell: Remove the DuckDB package from Julia and add it again
  4. Just proceed to set up your DuckDB connection and use “INSTALL fts” without any further modifications

This might also work by setting the environment variable directly in Julia like you already did instead of using PowerShell, but I haven’t tested it myself. If you set the environment variable temporarily in PowerShell things might break with the next update of DuckDB.jl and you might have to repeat the whole process over, though

I don’t know how so set environment variables permanently on Windows without admin rights

If setting the environment variable from within Julia works for you, you could maybe add it to a startup file in the .julia/config folder as decribed here so you won’t ever have to worry about setting it before updating DuckDB.jl (you’d still have to remember to always manually download and replace the matching duckdb.dll, though)

2 Likes