Skip to content

Commit 966df30

Browse files
committed
Fix Ubuntu 24.04 system dependencies
- Replace obsolete libgl1-mesa-glx with libgl1-mesa-dri for Ubuntu 24.04 - Add fallback mechanism to handle both Ubuntu 22.04 and 24.04 package names - Update condition from startsWith(matrix.os, 'ubuntu') to runner.os == 'Linux' - Add libgcc-s1 for better compatibility Fixes: Package 'libgl1-mesa-glx' has no installation candidate error
1 parent 74e310c commit 966df30

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/cross-platform-test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,21 @@ jobs:
8484
restore-keys: |
8585
${{ runner.os }}-pip-${{ matrix.python-version }}-
8686
87-
- name: Install system dependencies (Ubuntu)
88-
if: startsWith(matrix.os, 'ubuntu')
87+
- name: Install system dependencies (Linux)
88+
if: runner.os == 'Linux'
8989
run: |
9090
sudo apt-get update
91-
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1
91+
# Install common packages that work across Ubuntu versions
92+
sudo apt-get install -y \
93+
libglib2.0-0 \
94+
libsm6 \
95+
libxext6 \
96+
libxrender-dev \
97+
libgomp1 \
98+
libgcc-s1
99+
100+
# Try to install OpenGL libraries (different names in different Ubuntu versions)
101+
sudo apt-get install -y libgl1-mesa-dri || sudo apt-get install -y libgl1-mesa-glx || true
92102
93103
- name: Install system dependencies (macOS)
94104
if: startsWith(matrix.os, 'macos')

0 commit comments

Comments
 (0)