-
Notifications
You must be signed in to change notification settings - Fork 72
Error on Arch Linux: Path to shell executable "/usr/lib/usr/bin/swift" does not exist. #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like your Swift install does not follow the standard pattern for a Linux install. Executables should be in a folder How did you install Swift? |
I guess Swift is failing because P.S. Linking Swift binary into |
I'm having a very similar problem with vscode-swift. My installation is on a raspberry-pi 64 bit bullseye. Swift 5.8 installed from the distribution at https://swift-arm.com. I get the following errors in VSCode, to which I'm a novice:
Is this an issue with how the swift-arm distribution is layed out? @futurejones (The symlinks in /usr/bin were initially relative links like the following, but I made them absolute, thinking that might be the issue):
|
The extension assumes that all swift toolchains are structured as the Apple released ones ie all binaries are inside a Perhaps @futurejones can comment on why he chose to not include the |
🤔After trying to understand the situation correctly… It seems the fix is as simple as not hard-coding (and relying on) the parent directory of |
@adam-fowler can you post links to the commits where this change has occurred. Moving the installation directory from The installation directory can be changed to |
ok, I'll have to work around it. I made an assumption that all swift installs were structured as Apple structured theirs. |
Error:
Path to shell executable "/usr/lib/usr/bin/swift" does not exist.
which also prevents my vscode terminal from working.I saw #218
My binaries are at
/usr/lib/swift/bin
which I added to$PATH
and startedcode
via :env PATH=/usr/lib/swift/bin:$PATH code ./
but I continue to get the error
The terminal process failed to launch: Path to shell executable "/usr/lib/usr/bin/swift" does not exist.
as well as SourceKit errorLaunching server using command /usr/lib/usr/bin/sourcekit-lsp failed. Error: spawn /usr/lib/usr/bin/sourcekit-lsp ENOENT
If I manually set Swift: Path extension setting to
/usr/lib/swift/bin
I get the same error.When swift was installed, it linked
/usr/lib/swift/bin/swift
to/bin/swift
. I deleted the link while trying to resolve this issue.Environment
Additional context
The package: http://aur.archlinux.org/packages/swift-bin
executing
sudo ln -s /usr/lib/swift/bin /usr/lib/usr/bin
temporarily fixed the issue, though this is obviously not great.The text was updated successfully, but these errors were encountered: