SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

swift lint installed with `brew install swiftlint` on Ubuntu 22.04 crashes

Open valeriyvan opened this issue 6 months ago • 1 comments

New Issue Checklist

Bug Description

brew install swiftlint
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).

You have 11 outdated formulae installed.

==> Downloading https://ghcr.io/v2/homebrew/core/swiftlint/manifests/0.59.1
############################################################################################## 100.0%
==> Fetching swiftlint
==> Downloading https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:64bfd1f18fd38050c83d117ef116c
############################################################################################## 100.0%
==> Pouring swiftlint--0.59.1.x86_64_linux.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d
==> Summary
🍺  /home/linuxbrew/.linuxbrew/Cellar/swiftlint/0.59.1: 10 files, 166.4MB
==> Running `brew cleanup swiftlint`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
swiftlint
SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading libsourcekitdInProc.so failed
Illegal instruction (core dumped)

Environment

  • Ubuntu 22.04
  • swiftlint was successfully installed with brew install swiftlint

valeriyvan avatar May 16 '25 09:05 valeriyvan

On Linux, SwiftLint is not self-contained and requires libsourcekitdInProc.so as a runtime dependency. It's contained in all Swift toolchains. Citing from the README:

On Linux, SourceKit is expected to be located in /usr/lib/libsourcekitdInProc.so or specified by the LINUX_SOURCEKIT_LIB_PATH environment variable.

SimplyDanny avatar Jun 15 '25 19:06 SimplyDanny