Skip to content

Commit 343c747

Browse files
committed
fix: simplify libaio installation logic in Oracle CI
- Check if package is installed before attempting installation - Only install if package is not already present - Create symlink only if library file exists and symlink doesn't exist - Remove complex conditional logic that caused exit code 8 errors
1 parent c24b70c commit 343c747

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/tests.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,22 +395,19 @@ jobs:
395395
coverage: xdebug
396396
- name: Install Oracle Instant Client
397397
run: |
398+
set -e
398399
sudo apt-get update
399400
sudo apt-get install -y wget unzip
400401
# Install libaio (required for Oracle Instant Client)
401402
# In Ubuntu 24.04+, libaio1 is replaced with libaio1t64
402-
# Try to install libaio1t64 (ignore error if already installed)
403-
sudo apt-get install -y libaio1t64 || true
404-
# Check if libaio1t64 is installed or try libaio1
405-
if dpkg -l | grep -q libaio1t64 || [ -f /usr/lib/x86_64-linux-gnu/libaio.so.1t64 ]; then
406-
# Create symlink for compatibility with Oracle Instant Client
407-
if [ -f /usr/lib/x86_64-linux-gnu/libaio.so.1t64 ]; then
408-
sudo ln -sf /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
403+
if ! dpkg -l | grep -q "^ii.*libaio1t64"; then
404+
if ! dpkg -l | grep -q "^ii.*libaio1"; then
405+
sudo apt-get install -y libaio1t64 || sudo apt-get install -y libaio1
409406
fi
410-
elif sudo apt-get install -y libaio1 2>/dev/null; then
411-
echo "libaio1 installed successfully"
412-
else
413-
echo "Warning: libaio package not found, continuing anyway"
407+
fi
408+
# Create symlink for compatibility with Oracle Instant Client (Ubuntu 24.04+)
409+
if [ -f /usr/lib/x86_64-linux-gnu/libaio.so.1t64 ] && [ ! -f /usr/lib/x86_64-linux-gnu/libaio.so.1 ]; then
410+
sudo ln -sf /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
414411
fi
415412
cd /tmp
416413
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linux.x64-21.1.0.0.0.zip

0 commit comments

Comments
 (0)