File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,16 @@ echo "CUDA_VERSION: $CUDA_VERSION"
19
19
echo " Installing system dependencies..."
20
20
sudo apt-get update
21
21
22
- # Add LLVM official repository for newer clangd
23
- echo " Adding LLVM official repository..."
24
- wget https://apt.llvm.org/llvm.sh
25
- chmod +x llvm.sh
26
- sudo ./llvm.sh 17
27
-
28
- # Fix GPG key issues for LLVM repository
29
- echo " Fixing LLVM repository GPG key..."
30
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421 || {
31
- echo " Failed to add LLVM GPG key, trying alternative method..."
32
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
33
- }
34
-
35
- # Update package lists again after fixing GPG key
22
+ # Set up LLVM 17 APT source with modern GPG key handling
23
+ echo " Setting up LLVM 17 APT source with modern GPG key handling..."
24
+
25
+ # Download and install GPG key to /usr/share/keyrings
26
+ curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
27
+
28
+ # Write APT source list, explicitly binding keyring file
29
+ echo " deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-jammy-17.list
30
+
31
+ # Update package lists
36
32
sudo apt-get update
37
33
38
34
# Install clang and clangd first
You can’t perform that action at this time.
0 commit comments