Amazon Linux 2023 without librdkafka and librdkafka-devel RPM

0

Hello, I would like to ask question how to install librdkafka and librdkafka-devel package on my Amazon EC2 instance with Amazon linux 2023 - I have to use them for PHP rdkafka extension... Based on https://docs.aws.amazon.com/linux/al2023/release-notes/removed-AL2023.6-AL2.html - these packages are removed from Amazon Linux 2023 - but I need them :-( Please - provide me with the hint how to proceed further. Thanks in advance. BR, Jozef

asked a month ago59 views
3 Answers
1

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

profile pictureAWS
EXPERT
answered a month ago
profile picture
EXPERT
reviewed 25 days ago
0

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

profile picture
answered a month ago
profile pictureAWS
EXPERT
reviewed a month ago
0

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?

AWS
EXPERT
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions