Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script does not support ARM architecture servers #275

Open
xiaobanni opened this issue Sep 23, 2024 · 1 comment
Open

Script does not support ARM architecture servers #275

xiaobanni opened this issue Sep 23, 2024 · 1 comment

Comments

@xiaobanni
Copy link

Hi, I encountered an issue when using the lamp.sh script to install the LAMP stack on an ARM architecture server (e.g., aarch64). The script does not account for ARM architecture, and instead, it downloads the x86 version of MySQL, which leads to installation failure on ARM-based servers.

Here is the relevant section of the script responsible for downloading MySQL:

# Install mysql server
install_mysqld() {

    common_install

    is_64bit && sys_bit=x86_64 || sys_bit=i686
    mysql_ver=$(echo ${mysql} | sed 's/[^0-9.]//g' | cut -d. -f1-2)
    cd ${cur_dir}/software/
    _info "Downloading and Extracting MySQL files..."

    mysql_filename="${mysql}-linux-glibc2.12-${sys_bit}"
    if [ "${mysql_ver}" == "8.0" ]; then
        mysql_filename_url="https://cdn.mysql.com/Downloads/MySQL-${mysql_ver}/${mysql_filename}.tar.xz"
        download_file "${mysql_filename}.tar.xz" "${mysql_filename_url}"
        tar Jxf ${mysql_filename}.tar.xz
    else
        mysql_filename_url="https://cdn.mysql.com/Downloads/MySQL-${mysql_ver}/${mysql_filename}.tar.gz"
        download_file "${mysql_filename}.tar.gz" "${mysql_filename_url}"
        tar zxf ${mysql_filename}.tar.gz
    fi

    _info "Moving MySQL files..."
    mv ${mysql_filename}/* ${mysql_location}

    config_mysql ${mysql_ver}

    add_to_env "${mysql_location}"
}

Since the script assumes only x86 architecture, the MySQL installation fails on ARM systems. Here is the error message I encountered:

zsh: exec format error: mysql

Would it be possible to add support for ARM architecture in the script?

Thank you!

@teddysun
Copy link
Owner

teddysun commented Oct 7, 2024

LAMP does not support for ARM architecture.
You can try LCMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants