msphpsql: aws | Debian 10/11 [hvm] (64-bit aarch64/Arm) | Unknown processor architecture
Hi there, we have a cloud project arm64/aarch64 based
We can’t use x86 arch. We must use new arm. we tried this script to force install correctly driver for arm, but php return “Unknown processor architecture.”
the script:
sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo printf "deb [arch=arm64,amd64] https://packages.microsoft.com/debian/10/prod buster main" | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt update -y && sudo apt upgrade -y
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install -y unixodbc-dev
# optional: kerberos library for debian-slim distributions
sudo apt-get install -y libgssapi-krb5-2
# install php 8 ext
sudo pecl config-set php_ini /etc/php/8.0/fpm/php.ini
sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
sudo printf "; priority=20\nextension=sqlsrv.so\n" | sudo tee /etc/php/8.0/mods-available/sqlsrv.ini
sudo printf "; priority=30\nextension=pdo_sqlsrv.so\n" | sudo tee /etc/php/8.0/mods-available/pdo_sqlsrv.ini
sudo phpenmod -v 8.0 sqlsrv pdo_sqlsrv
php try script:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$serverName = "serverName\\sqlexpress"; //serverName\instanceName
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"dbName");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 22 (6 by maintainers)
Can we +1 this somewhere?
AWS supports and recommends arm64, this is a blocking issue for us to move to arm64 ec2 instance
Thanks @MwSpaceLLC for the info. I will mark this as a feature request for the management’s awareness.
So I can see that Arm support is out
The ARM64 architecture on Red Hat 8, 9, Debian 11, and Ubuntu 20.04, 22.04 are supported starting with version 18.1.But wouldn’t it be realistic to get the .so file built for Alpine as well? Where does one push to get this done?
Issue can be closed I believe.
18.18 out now which has support for arm64 for Alpine ❤️🔥 thanks for that
Just to answer my own question regarding moving the extension from debian/ubuntu onto alpine, sadly as Alpine uses musl libc instead of glibc it won’t run - even with libc6-compat package installed.