I'm trying to install PostgreSQL 12 to launch a Rails app on AWS (EC2).
When I tried to install the devel file, I got the following error.
$sudo yum -y install postgresql12-devel
Plugins loaded: extras_suggestions, langpacks, priorities, update-motd
27 packages excluded due to repository priority protections
Resolving dependencies
->Performing transaction confirmation.
--->Install package postgresql12-devel.x86_64 0: 12.4-1PGDG.rhel7
->Dependency handling: llvm5.0-devel>= 5.0 package: postgresql12-devel-12.4-1PGDG.rhel7.x86_64
->Dependency handling: llvm-toolset-7-clang>= 4.0.1 package: postgresql12-devel-12.4-1PGDG.rhel7.x86_64
->Dependency resolution finished.
Error: Package: postgresql12-devel-12.4-1PGDG.rhel7.x86_64 (pgdg12)
Request: llvm5.0-devel>= 5.0
Error: Package: postgresql12-devel-12.4-1PGDG.rhel7.x86_64 (pgdg12)
Request: llvm-toolset-7-clang>= 4.0.1
You can use --skip-broken to avoid the problem.
** Found 1 pre-existing rpmdb problem (s),'yum check' output follows:
pgdg-redhat-repo-42.0-12.noarch is missing the following request: /etc/redhat-release
What I tried
Until the installation of postgresql12 and postgresql12-server, I proceeded by referring to the following qiita article.
[Ansible] Install PostgreSQL 12 on Amazon Linux 2 and convert it to Ansible Playbook [PostgreSQL]
As you can see in this article, when installing the PostgreSQL yum repository on the OS, an error occurs because the/etc/redhat-release file does not exist, so I installed it with the "--nodeps" option.
$sudo rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
I thought that this was the place to focus on to solve the problem, but I didn't understand it because I was a beginner and lacked the prerequisite knowledge.
Since this is my first time to post a question on the question site, I think there may be some missing information, but thanks for your cooperation.
Supplementary information (FW/tool version, etc.)-
Answer # 1
Related articles
- postgresql - an error occurs when storing 2*10 9 or more int type data in the db defined by sequelize if it is less than this nu
- garbled error when installing postgresql
- postgresql - an error occurs when scaffolding on aspnet core using ssl communication
- postgresql - an error occurs when creating a table with postgre
- ruby - i want to resolve an error when installing gem byebug
- syntax error occurs in nextjs + typescript
- centos - leptonica error when installing tesseract-ocr
- i want to know why an access error occurs when creating a vbo buffer in opengl
- java - an error occurs in the element part of the array and it does not resolve
- xcode - "no such module'realm swift'" error when installing realm in carthage
- python - how to find error line when not-null constraint error occurs when executing migrate with django
- flutter - an error occurs in the implementation of onpressed
- cors error occurs when hitting api
- python - import error occurs when accessing djangon admin
- [react native] i want to jump to the error part when an error occurs in the form
- reactjs - react + firestore an error occurs when trying to call multiple collections
- leaflet when javascript is made into a separate file, an error occurs and it is not displayed
- python 3x - an error occurs in the library for python3 tkinter drag and drop
- postgresql - errno::enoent: no such file or directory @ dir_s_chdir error appears and app doesn't start on unicorn
- postgresql : Connection to AWS database gives back "You may not specify an IPv4 CIDR for an existing referenced group id rule."
- Queries running very slowly in Amazon RDS PostgreSQL read-replica
- postgresql : PSQL Connects to AWS RDS Instance for Co-Worker, But Not For Me
- EC2 Using EC2, I want to give up the Rails app to AWS Fatal: ??? "Root" ??? (Peer)?
- Rails + PostgreSQL + NGINX ON DOCKER When building MacOS Chrome 502 BAD GATEWAY
- Schema replication Postgresql AWS
- I can connect to AWS aurora with psql, but I can't insert
It seems that postgresql12 is not officially supported in the Amazon Linux 2 repository yet, so installation is at your own risk.
If you bring your own rpm and install it and you have a dependency problem, you have to fix it yourself.
--nodeps
At the time of breaking the dependency, it is already in the category of self-responsibility.I tried it lightly at hand, but even if I could install postgresql and postgresql-server, I ended up trying some postgresql-devel.
llvm-toolset-7-clang>= 4.0.1
Could not resolve the dependency of.I think you can use it if you can solve it yourself.
If PostgreSQL 11 is fine now
sudo amazon-linux-extras install postgresql11
I think that you can install it with, so if you do not need to be 12, I think that you should use that.When installing with amazon-linux-extras, the repository will also be enbaled at the same time, so you can install it by specifying postgresql-devel with yum after that.
However, in reality
Package postgresql-devel is obsoleted by libpq-devel, trying to install libpq-devel-11.5-1.amzn2.x86_64 instead
Strictly speaking, it seems that something a little different will be included.