...

Guides for PDF library

How to use Flyingbee PDF Conversion SDK.


Want to Try?

Try Flyingbee PDF Converter Online for Free, play with PDF to MS Office (.docx, .xlsx, .pptx) conversion on Web.

Launch Web Demo

Powered by Flyingbee PDF Conversion SDK

1.2 check-version.sh


james wei 2025-08-23 15:41:35

This article uses a script to check whether the system meets the conditions for running the SDK, You can check if the device supports running our SDK.

There is a script(check-version.sh) used to check if your linux system supports the SDK. You can save it as a check-version.sh file, then upload it to a Linux server and execute the command on the server.

$ cd "/home/your-name/check-version-folder/"
$ ls # Is there check-version.sh file in current directory
check-version.sh
$ chmod +x check-version.sh  # Granting executable permissions
$ ./check-version.sh   # execute command
=== System Information ===
Linux Ubuntu25 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr  6 14:37:51 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
=== GLIB Paths ===
Could not determine default  path.
----------------
Found libstdc++.so.6 paths (1 locations):
+----------------------------------+--------------------------------------------------
| Version Information              | Path                       
+----------------------------------+--------------------------------------------------
| GLIBCXX=3.4.34, CXXABI=1.3.15    | /usr/lib/aarch64-linux-gnu/libstdc++.so.6 
+----------------------------------+--------------------------------------------------
=== Check GLIB Version ===
+----------------------+--------------------+---------------------
| Component            | Required Version   | Detected           
+----------------------+--------------------+---------------------
| GLIBC                | 2.12 or newer      | 2.41 (OK)          
| GLIBCXX              | 3.4.15 or newer    | 3.4.34 (OK)        
| CXXABI               | 1.3.5 or newer     | 1.3.15 (OK)        
+----------------------+--------------------+---------------------+
Press any key to exit...

By following these steps, you should be able to successfully deploy and run the Flyingbee PDF Converter SDK. If you encounter any issues, carefully check the error messages and make adjustments or install missing dependencies as needed.

We sincerely thank you for choosing Flyingbee PDF Converter! We hope our product brings convenience to your work and studies.
Like this: 



📦 Attachment:


Copy to Notepad and save as "check-version.sh"

#!/bin/bash

# Minimum required versions (defined as constants)
MIN_GLIBC_VERSION="2.12"
MIN_GLIBCXX_VERSION="3.4.15"
MIN_CXXABI_VERSION="1.3.5"

# Display system information
echo "=== System Information ==="
uname -a

# Find all libstdc++.so.6 paths
LIBSTDC_PATHS=($(find /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu -name 'libstdc++.so.6' 2>/dev/null))

# Check if any paths were found
if [ ${#LIBSTDC_PATHS[@]} -eq 0 ]; then
    echo "Error: libstdc++.so.6 not found."
    exit 1
fi

# Initialize variables for version tracking
declare -A paths_info
max_glibcxx_ver=""
max_cxxabi_ver=""
default_path=""

# Try to find default path using locate
default_path=$(locate libstdc++.so.6 2>/dev/null | grep 'libstdc++.so.6$' | head -n 1)
 
# If locate didn't find it, try the g++ dependency method as fallback
if [ -z "$default_path" ]; then
    default_path=$(ldd /usr/bin/g++ 2>/dev/null | grep libstdc++.so.6 | awk '{print $3}')
fi

# Process each found library path
for path in "${LIBSTDC_PATHS[@]}"; do
    # Extract version information from the library
    glibcxx_ver=$(strings "$path" 2>/dev/null | grep -o 'GLIBCXX_[0-9.]*' | sort -V | tail -n1 | sed 's/GLIBCXX_//')
    cxxabi_ver=$(strings "$path" 2>/dev/null | grep -o 'CXXABI_[0-9.]*' | sort -V | tail -n1 | sed 's/CXXABI_//')
    
    # Track maximum versions found
    [[ "$(echo -e "$max_glibcxx_vern$glibcxx_ver" | sort -V | tail -n1)" == "$glibcxx_ver" ]] && max_glibcxx_ver="$glibcxx_ver"
    [[ "$(echo -e "$max_cxxabi_vern$cxxabi_ver" | sort -V | tail -n1)" == "$cxxabi_ver" ]] && max_cxxabi_ver="$cxxabi_ver"
    
    # Record path information (mark default path)
    if [ "$path" == "$default_path" ]; then
        paths_info["$path"]="GLIBCXX=$glibcxx_ver, CXXABI=$cxxabi_ver (default)"
    else
        paths_info["$path"]="GLIBCXX=$glibcxx_ver, CXXABI=$cxxabi_ver"
    fi
done

# Display libstdc++.so.6 paths
echo -e "=== GLIB Paths ==="
# Output default path information
if [ -n "$default_path" ]; then
    echo -e "Default  path (used by /usr/bin/g++): $default_path"
else
    echo -e "Could not determine default  path."
fi

echo -e "----------------"
# Output all path version information
echo -e "Found libstdc++.so.6 paths (${#LIBSTDC_PATHS[@]} locations):"
printf "+----------------------------------+--------------------------------------------------n"
printf "| %-32s | %-26s n" "Version Information" "Path"
printf "+----------------------------------+--------------------------------------------------n"
 
for path in "${!paths_info[@]}"; do
    printf "| %-32s | %-26s n" "${paths_info[$path]}" "$path"
done

# Check if required commands exist
check_commands() {
    local missing=()
    for cmd in strings ldd find awk grep head tail sort sed; do
        if ! command -v "$cmd" &>/dev/null; then
            missing+=("$cmd")
        fi
    done
    if [ ${#missing[@]} -gt 0 ]; then
        echo "Error: The following required commands are not found: ${missing[*]}"
        exit 1
    fi
}
printf "+----------------------------------+--------------------------------------------------n"
 
# Run the command check
check_commands

echo -e "=== Check GLIB Version ==="

# Extract GLIBC version
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')

# Generate detection results table
printf "+----------------------+--------------------+---------------------n"
printf "| %-20s | %-18s | %-18s n" "Component" "Required Version" "Detected"
printf "+----------------------+--------------------+---------------------n"

# GLIBC detection
if [ -n "$GLIBC_VER" ]; then
    GLIBC_STATUS="OK"
    [[ "$(echo -e "$MIN_GLIBC_VERSIONn$GLIBC_VER" | sort -V | head -n1)" != "$MIN_GLIBC_VERSION" ]] && GLIBC_STATUS="NO"
    printf "| %-20s | %-18s | %-18s n" "GLIBC" "$MIN_GLIBC_VERSION or newer" "$GLIBC_VER ($GLIBC_STATUS)"
else
    printf "| %-20s | %-18s | %-18s n" "GLIBC" "$MIN_GLIBC_VERSION or newer" "Not Found (NO)"
fi

# GLIBCXX detection (using maximum version found)
if [ -n "$max_glibcxx_ver" ]; then
    GLIBCXX_STATUS="OK"
    [[ "$(echo -e "$MIN_GLIBCXX_VERSIONn$max_glibcxx_ver" | sort -V | head -n1)" != "$MIN_GLIBCXX_VERSION" ]] && GLIBCXX_STATUS="NO"
    printf "| %-20s | %-18s | %-18s n" "GLIBCXX" "$MIN_GLIBCXX_VERSION or newer" "$max_glibcxx_ver ($GLIBCXX_STATUS)"
else
    printf "| %-20s | %-18s | %-18s n" "GLIBCXX" "$MIN_GLIBCXX_VERSION or newer" "Not Found (NO)"
fi

# CXXABI detection (using maximum version found)
if [ -n "$max_cxxabi_ver" ]; then
    CXXABI_STATUS="OK"
    [[ "$(echo -e "$MIN_CXXABI_VERSIONn$max_cxxabi_ver" | sort -V | head -n1)" != "$MIN_CXXABI_VERSION" ]] && CXXABI_STATUS="NO"
    printf "| %-20s | %-18s | %-18s n" "CXXABI" "$MIN_CXXABI_VERSION or newer" "$max_cxxabi_ver ($CXXABI_STATUS)"
else
    printf "| %-20s | %-18s | %-18s n" "CXXABI" "$MIN_CXXABI_VERSION or newer" "Not Found (NO)"
fi

printf "+----------------------+--------------------+---------------------+n"


# Pause
echo "Press any key to exit..."
read -n 1 -s -r




1.1 Prerequisites for Linux
2.1 Install Fontconfig

Apple, the Apple logos, MacBook, iPad, iPhone, Apple Watch, and Apple Vision Pro are trademarks of Apple Inc., registered in the U.S. and other countries. App Store and Mac App Store is a service mark of Apple Inc., registered in the U.S. and other countries.
© 2014 - 2025 Flyingbee Software, All Right Reserved.
United StatesUnited States

We uses cookies to give you the best experience, analyze traffic, and personalize content. By continuing using our Site, you agree to our use of cookies. The information collected might relate to you, your preferences, or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Read our Privacy Policy or manage your cookie preferences. If you would like to submit an opt-out request with respect to your non-cookie personal information (e.g., your email address), find our support email address to opt-out of sale/sharing/targeting with respect to non-cookie personal information.