[英]Error when installing Swift Open Source Xcode Toolchain: You cannot install Swift Open Source Xcode Toolchain in this location
[英]Swift toolchain location on Fedora
我正在嘗試設置 CLion 以在 Fedora 32 上與 Swift 一起使用。 Swift 插件要求提供工具鏈路徑。
我已經通過swift-lang
package 安裝了 Swift。 運行which swift
返回/usr/bin/swift
。
這是到/usr/libexec/swift/bin/swift
的符號鏈接,它是實際的可執行文件。 /usr/bin/swift
和/usr/libexec/swift/bin/swift
似乎都不是 CLion 想要的工具鏈路徑。
任何形式的幫助將不勝感激。
我遇到了同樣的問題,我已經設法解決了,基本上,您需要在/usr/libexec/swift/
mv
創建一個usr
文件夾,並將所有原始文件夾(如bin
、 local
、 share
等)添加到新的usr
文件夾。 請記住在/usr/bin/
中重新創建swiftc
和swift
的符號鏈接。
更長的版本:
根據 Cgarcia E88 在這里的評論:
顯然,您選擇的路徑必須包含
usr
下面的文件夾,因此在您(r)的情況下,它應該只是/
但通常如果 swift 位於SOME_PATH/usr/bin/swift
那么您必須 selectSOME_PATH
。
在詳細了解 Swift 工具鏈文件夾的外觀后,我很確定/usr/libexec/swift/
應該是工具鏈文件夾,盡管缺少一些必需的文件夾結構。 默認情況下是:
/usr/libexec/swift
├── bin
│ ├── swift
│ └── ...
├── include
├── lib
├── local
└── share
雖然它應該是:
/usr/libexec/swift
└── usr
├── bin
│ ├── swift
│ └── ...
├── include
├── lib
├── local
└── share
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.