- Newest
- Most votes
- Most comments
Hi,
If you want to have a direct install on your EC2 instance, you can install librdkafka from the Confluent YUM repositories.
Corresponding doc is here: https://docs.confluent.io/platform/current/installation/installing_cp/rhel-centos.html#get-the-software
To add a package repo to the yum config of your EC2 instance: https://docs.aws.amazon.com/linux/al2/ug/add-repositories.html
Best,
Didier
You're correct that the librdkafka and librdkafka-devel packages are not included in Amazon Linux 2023. This is because Amazon Linux 2023 has removed or changed several packages that were present in Amazon Linux 2.
To install these packages on Amazon Linux 2023, you have a few options:
-
Compile from source: You can download the librdkafka source code from its official repository and compile it yourself. This method ensures you have the latest version but requires more technical knowledge.
-
Use an alternative repository: You might be able to find these packages in third-party repositories that are compatible with Amazon Linux 2023. However, be cautious when using non-official repositories.
-
Use the Amazon Linux 2 repository: As a workaround, you could download the RPM files for librdkafka and librdkafka-devel from the Amazon Linux 2 repository and install them manually on your Amazon Linux 2023 instance. This method isn't ideal as it may lead to compatibility issues, but it could work as a temporary solution.
-
Consider using a container: If your application allows, you could run it in a container based on a different Linux distribution that includes these packages.
-
Request the package: Amazon allows users to request packages to be added to Amazon Linux 2023. You could file an issue in the amazon-linux-2023 repository on GitHub to request these packages be added.
Remember that whichever method you choose, you'll need to ensure that the librdkafka version is compatible with your PHP rdkafka extension. Also, be prepared to manage any potential conflicts or dependencies manually.
Given the importance of these packages for your use case, you might also want to consider if Amazon Linux 2023 is the best choice for your needs, or if another distribution that includes these packages might be more suitable.
Sources
Comparing AL2 and AL2023 - Amazon Linux 2023
How to install package that has been removed from Amazon Linux 2023? | AWS re:Post
You can try the instructions at librdkafka site, i.e. either install from repository or compile them.
For PHP librdkafka compilation, you can refer to How do I compile PHP extensions on Amazon Linux 2023?
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a month ago