Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't install extensions on Ubuntu because of version mismatch #623

Closed
fmichonneau opened this issue Dec 3, 2024 · 10 comments
Closed

Can't install extensions on Ubuntu because of version mismatch #623

fmichonneau opened this issue Dec 3, 2024 · 10 comments
Milestone

Comments

@fmichonneau
Copy link

With the duckdb package version 1.1.3, on Ubuntu 24.10 I see:

library(duckdb)
#> Loading required package: DBI
con <- dbConnect(duckdb())
dbExecute(con, "INSTALL spatial;")
#> Error in `duckdb_result()`:
#> ! rapi_execute: Failed to run query
#> Error: IO Error: Failed to install 'spatial'
#> The file was built for DuckDB version 'v1.1.3', but we can only load extensions built for DuckDB version '19864453f7'.
dbGetQuery(con, "PRAGMA version;")
#>   library_version  source_id
#> 1   v1.1.3-dev165 19864453f7

Created on 2024-12-03 with reprex v2.1.1

This doesn't happen with the duckdb cli:

 duckdb
v1.1.3 19864453f7
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D pragma version;
┌─────────────────┬────────────┐
│ library_version │ source_id  │
│     varchar     │  varchar   │
├─────────────────┼────────────┤
│ v1.1.3          │ 19864453f7 │
└─────────────────┴────────────┘

With the R package, it seems like the extension installer is picking up the source_id instead of the version number. I am just guessing, but I'm wondering if it's because the duckdb version bundled with the R package has the dev165 suffix?

@fmichonneau
Copy link
Author

Update: I cloned the repository locally and removed the dev165 suffix from

#define DUCKDB_PATCH_VERSION "3-dev165"
(lines 2 and 11).

After reinstalling the package from these local files, the extension can be installed.

@kent37
Copy link

kent37 commented Dec 3, 2024

I have the same error on MacOS.

@kent37
Copy link

kent37 commented Dec 3, 2024

And the same fix works for me.

This was referenced Dec 3, 2024
@krlmlr
Copy link
Collaborator

krlmlr commented Dec 4, 2024

Thanks, good catch. I can push duckdb 1.1.3-1 soon.

@krlmlr krlmlr added this to the 1.1.3-1 milestone Dec 4, 2024
@krlmlr
Copy link
Collaborator

krlmlr commented Dec 4, 2024

Done in 5502a90.

@krlmlr krlmlr closed this as completed Dec 4, 2024
@eitsupi
Copy link
Contributor

eitsupi commented Dec 4, 2024

Shouldn't the release version be tested on CI for extension installation to prevent regression?

@krlmlr
Copy link
Collaborator

krlmlr commented Dec 4, 2024

Good catch, adding infrastructure for this.

@gustavdelius
Copy link

gustavdelius commented Dec 13, 2024

Just wanted to report that the issue seems to persist in version 1.1.3-1.

<error/rlang_error>
Error in `duckdb_result()`:
! rapi_execute: Failed to run query
Error: HTTP Error: Failed to download extension "httpfs" at URL "http://nightly-extensions.duckdb.org/v1.1.3/linux_amd64/httpfs.duckdb_extension.gz" (HTTP 403)
Extension "httpfs" is an existing extension.
---
Backtrace:
     ▆
  1. ├─dplyr::select(...)
  2. ├─rfishbase::species(sp$latin_name[missing])
  3. │ ├─fb_tbl(endpt, server, version) %>% fix_ids()
  4. │ └─rfishbase::fb_tbl(endpt, server, version)
  5. │   └─duckdbfs::open_dataset(urls[tbl])
  6. │     └─duckdbfs:::parse_uri(sources, conn = conn, recursive = recursive)
  7. │       └─duckdbfs:::load_httpfs(conn)
  8. │         ├─DBI::dbExecute(conn, paste0("INSTALL 'httpfs'", source, ";"))
  9. │         └─DBI::dbExecute(conn, paste0("INSTALL 'httpfs'", source, ";"))
 10. │           ├─DBI::dbSendStatement(conn, statement, ...)
 11. │           └─DBI::dbSendStatement(conn, statement, ...)
 12. │             ├─DBI::dbSendQuery(conn, statement, ...)
 13. │             └─duckdb::dbSendQuery(conn, statement, ...)
 14. │               └─duckdb (local) .local(conn, statement, ...)
 15. │                 └─duckdb:::duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
 16. └─rfishbase:::fix_ids(.)
 17.   ├─"Speccode" %in% colnames(full_data)
 18.   └─base::colnames(full_data)
 19.     └─base::is.data.frame(x)
Run rlang::last_trace(drop = FALSE) to see 14 hidden frames.

@krlmlr
Copy link
Collaborator

krlmlr commented Dec 16, 2024

Thanks, weird. I really wonder why this is taking the extension from the "nightly". I double-checked, the duckdb code is set to v1.1.3 . @Tmonster: any idea?

@gustavdelius
Copy link

I am sorry. It turns out to be a problem with the duckdbfs package, not with duckdb itself. I have now reposted at cboettig/duckdbfs#29 and you can close this issue.

@krlmlr krlmlr closed this as completed Dec 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants