E: Unable to locate package unixODBC-dev
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y unixODBC-dev && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
I am getting this even though I did an apt-get update. Is this normal?
This is my Dockerfile:
FROM george/php:7.4-fpm
RUN apt-get --allow-releaseinfo-change update
RUN apt-get update && apt-get install -y \
freetds-bin \
freetds-dev \
freetds-common
RUN apt-get update && apt-get install -y unixODBC-dev && rm -rf /var/lib/apt/lists/*
RUN set -x \
&& cd /usr/src/php/ext/odbc \
&& phpize \
&& sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \
&& ./configure --with-unixODBC=shared,/usr \
&& docker-php-ext-install odbc
RUN docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr
RUN docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu
RUN docker-php-ext-install pdo_odbc
RUN docker-php-ext-install pdo_dblib
RUN docker-php-ext-install pcntl
RUN docker-php-ext-enable pdo_odbc
RUN docker-php-ext-enable pdo_dblib
RUN docker-php-ext-enable pcntl
I am using a box based off Debian:
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Trying to understand why installing ODBC is so hard.