问题
In my repository setup, I have the following:
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Because my machine is a 64 bit machine, my basesearch is x86_64 ( see below yum-debug-dump output ):
yum-debug-dump version 1
%%%%SYSTEM INFO
uname: 2.6.32-573.12.1.el6.x86_64, x86_64
rpm ver: RPM version 4.8.0
python ver: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
%%%%YUM INFO
arch: ia32e
basearch: x86_64
releasever: 6
yum ver: 3.2.29
enabled plugins: fastestmirror,presto
global excludes:
.... ( entire output NOT included )
Is it possible to make another repository called, say, "mysql-connectors-community-i386" and with the following configuration so I can support both:
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/i386/
enabled=1
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Yes, the URL is correct.
回答1:
This actually does work. It is kind of klunky, and I assume there are better ways, but it works and helped me get around some issues.
Edit, for clarity, here are my connector repos to get both 64 bit and 32 bit on my machine:
more /etc/yum.repos.d/mysql-community.repo
...
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql-connectors-community-32]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/i386/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
来源:https://stackoverflow.com/questions/55908696/yum-repository-setup-for-both-32-bit-and-64-bit-mysql-connector