Skip to content

Support for Alpine Linux (musl libc) #12097

@mbl-35

Description

@mbl-35

Steps To Reproduce

  1. Fresh wsl alpine install
  2. check latest-stable for main and community in /etc/apk/repositories
  3. apk update && upgrade --available
  4. apk add --no-cache git curl bash
  5. apk add libc6-compat gcompat
  6. curl -L0 "https://vault.bitwarden.com/download/?app=cli&platform=linux" -o bw.zip
  7. unzip bw.zip && rm bw.zip && chmod u+x ./bw

Expected Result

Latest bw cli available on host but not working

Actual Result

alpine$ ./setup.sh
Linux Detected
ID: alpine
Alpine Distro Detected
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
v3.20.3-336-g9bf1b48dd0b [https://dl-cdn.alpinelinux.org/alpine/latest-stable/main]
v3.20.3-345-ge6354381462 [https://dl-cdn.alpinelinux.org/alpine/latest-stable/community]
OK: 24166 distinct packages available
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/APKINDEX.tar.gz
Executing busybox-1.36.1-r29.trigger
OK: 447 MiB in 84 packages
(1/3) Installing musl-obstack (1.2.3-r2)
(2/3) Installing libucontext (1.2-r3)
(3/3) Installing gcompat (1.1.0-r4)
OK: 447 MiB in 87 packages
Installing bitwarden as it's not available
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 34.9M  100 34.9M    0     0  20.5M      0  0:00:01  0:00:01 --:--:-- 48.5M
Archive:  bw.zip
  inflating: bw
Error relocating ./bw: fcntl64: symbol not found

Install Failed

Screenshots or Videos

No response

Additional Context

$ ldd ./bw     
        /lib64/ld-linux-x86-64.so.2 (0x7fb50b038000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fb50b038000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fb50ad9f000)
        libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb50b038000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fb50ad7b000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fb50b038000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb50b038000)
        ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7fb50ad74000)
Error relocating ./bw: fcntl64: symbol not found
Error relocating ./bin/bw: gnu_get_libc_version: symbol not found
Error relocating ./bin/bw: setcontext: symbol not found
Error relocating ./bw: backtrace: symbol not found
Error relocating ./bw: backtrace_symbols: symbol not found
Error relocating ./bw: __register_atfork: symbol not found
Error relocating ./bw: makecontext: symbol not found
Error relocating ./bw: getcontext: symbol not found
Error relocating ./bw: __libc_stack_end: symbol not found

To be linked with : bitwarden/cli: issue#155.
This prevents using bitwarden with tools such as chezmoi on Alpine OS..

Operating System

Linux

Operating System Version

Alpine 3.20

Shell

Bash

Build Version

bw-linux-2024.11.1

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcliCLI Application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions