Unable to install the extension
jahnavisana2812 opened this issue · comments
Is there an alternative method to install the extension that doesn't involve using make? I attempted to use the EDB package, but encountered a "package not found" error. Could you assist me with this? Below are the steps I followed according to the provided repository.
- dnf install yum-utils
- rpm --import 'https://downloads.enterprisedb.com/XZ6NaT5ltHlE1Glt2x7byElgNDGKdY92/enterprise/gpg.E71EB0829F1EF813.key'
- curl -1sLf 'https://downloads.enterprisedb.com/XZ6NaT5ltHlE1Glt2x7byElgNDGKdY92/enterprise/config.rpm.txt?distro=el&codename=8' > /tmp/enterprise.repo
- dnf config-manager --add-repo '/tmp/enterprise.repo'
- dnf -q makecache -y --disablerepo='*' --enablerepo='enterprisedb-enterprise'
- sudo dnf -y install mysql_fdw_15
Error: Unable to find a match: mysql_fdw_15
HI Jahnavi,
I checked at my end against the steps mentioned by you and it seems working fine on RHEL8 x86_64.
[root@fde1228da0ab yum.repos.d]# sudo dnf -y install mysql_fdw_15 (working)
Could you please just try like - ( connect to root and fire these commands one by one)
- curl -1sLf 'https://downloads.enterprisedb.com/XZ6NaT5ltHlE1Glt2x7byElgNDGKdY92/enterprise/setup.rpm.sh' | sudo -E bash
- sudo yum -qy module disable postgresql
- dnf -y install mysql_fdw_15
also could you please check if you can install this package
dnf install edb-as15-server
regards,
I am actually running these commands in a dockerfile.I tried the following 2 methods
- Using the makefile
- Using the edb repository file.
Sharing the dockerfile of both the methods I tried
Method 1:
FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1
ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
/tmp/mysql-fdw.tar.gz
RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
rm -rf /tmp/mysql-fdw.tar.gz
WORKDIR /tmp/mysql-fdw
RUN export PATH=/usr/pgsql-16/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install
USER 26
Error I keep getting:
make: mysql_config: Command not found
make: mysql_config: Command not found
Makefile:44: *** PostgreSQL 11, 12, 13, 14, 15, or 16 is required to compile this extension. Stop.
Method 2:
FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
RUN microdnf install -y dnf
RUN curl -1sLf 'https://downloads.enterprisedb.com/XZ6NaT5ltHlE1Glt2x7byElgNDGKdY92/enterprise/setup.rpm.sh'
RUN dnf install edb-as15-server
RUN dnf -y install mysql_fdw_15
USER 26
Error I keep getting:
Error: Unable to find a match: edb-as15-server
Error: Unable to find a match: mysql_fdw_15
Hi @jahnavisana2812,
make: mysql_config: Command not found
make: mysql_config: Command not found
You need to install mysql client library to compile mysql_fdw using sources. Please install the required client library and let us know your feedback.
Can you help me out using EDB package?Instead of makefile
Hey,I have installed the mysql client and following is the attached dockerfile.I am still stuck at the same error.Please help!
FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1
ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
/tmp/mysql-fdw.tar.gz
RUN microdnf install -y yum
RUN rpm -Uvh https://repo.mysql.com/mysql80-community-release-el8-3.noarch.rpm
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
RUN yum --enablerepo=mysql80-community install -y mysql-community-client
RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
rm -rf /tmp/mysql-fdw.tar.gz
WORKDIR /tmp/mysql-fdw
RUN yum install -y gcc \
mysql-server
RUN export PATH=/usr/pgsql-16/bin/:$PATH && export PATH=/usr/local/mysql/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install
USER 26
Error I'm getting:
make: mysql_config: Command not found
make: mysql_config: Command not found
Makefile:44: *** PostgreSQL 11, 12, 13, 14, 15, or 16 is required to compile this extension. Stop.
You need to install mysql-devel package or whatever it is called.
Configured it successfully Now I don't get the error of the mysql_config not found but the Makefile:44 error still remains.Can someone help?Thanks in advance!
FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1
ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
/tmp/mysql-fdw.tar.gz
RUN microdnf install -y yum
RUN rpm -Uvh https://repo.mysql.com/mysql80-community-release-el8-3.noarch.rpm
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
RUN yum --enablerepo=mysql80-community install -y mysql-community-client
RUN yum --enablerepo=mysql80-community install -y mysql-community-devel
RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
rm -rf /tmp/mysql-fdw.tar.gz
WORKDIR /tmp/mysql-fdw
RUN yum install -y gcc \
mysql-server
RUN export PATH=/usr/pgsql-16/bin/:$PATH && export PATH=/usr/local/mysql/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install
USER 26
Error:Makefile:44: *** PostgreSQL 11, 12, 13, 14, 15, or 16 is required to compile this extension. Stop.