CentOS7下无法安装BDR-postgres:执行yum命令提示无可用包
Hey there, let's work through this error you're hitting when running sudo yum install postgresql-bdr94-bdr. That "package not available" message almost always ties back to a missing repository or a configuration hiccup—here's how to troubleshoot it step by step:
Check if the BDR repository is configured
PostgreSQL BDR packages aren't included in default YUM repositories, so you need the BDR-specific repo set up first. Run this command to see if it's already enabled:yum repolist enabled | grep bdrIf you get no output, the repo isn't configured yet—let's fix that next.
Add the PostgreSQL BDR 9.4 repository
You have two options here:- Obtain the official repository configuration package from the BDR maintainer's official resources and install it (this will automatically set up the repo for you)
- Create a repo file manually:
- Make a new file named
bdr94.repoin the/etc/yum.repos.d/directory - Fill it with configuration details matching your OS version and architecture. This includes a valid base URL pointing to the BDR 9.4 package repository, and the correct GPG key info for package validation (you can get these specifics from the official BDR 9.4 documentation)
Example structure for the repo file:
[bdr94] name=PostgreSQL BDR 9.4 for [Your OS Version] - $basearch baseurl=[Valid BDR 9.4 Repository URL for Your OS] enabled=1 gpgcheck=1 gpgkey=[Valid GPG Key URL for the Repository] - Make a new file named
Clean and refresh YUM cache
Old or corrupted cache can sometimes stop YUM from detecting new packages. Run these commands to clear and rebuild the cache:sudo yum clean all sudo yum makecacheDouble-check the package name
Whilepostgresql-bdr94-bdris the correct name for BDR 9.4, it's worth verifying available packages to be sure. Run this search command:yum search postgresql-bdrIf you don't see the 9.4 version listed, it might mean your OS doesn't support this older BDR release.
Verify system compatibility
PostgreSQL BDR 9.4 is an older version, and it may not be supported on newer OS releases (like CentOS 8/RHEL 8 or later). If your system is too new, you'll need to either upgrade to a newer supported BDR version or use an OS release that's compatible with BDR 9.4 (like CentOS 7).
After working through these steps, try running the install command again:
sudo yum install postgresql-bdr94-bdr
内容的提问来源于stack exchange,提问作者Renjith JR

