Amazon linux AMI cannot find packages

0

Hi, I need some packges to build some binaries on EC2 running amazon linux, sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y

Im getting this error :

Error: Unable to find a match: mesa-opencl-icd ocl-icd-opencl-dev bzr build-essential libhwloc-dev

Arc
asked 10 months ago611 views
3 Answers
0

I don't think the apt command is available on Amazon Linux.
I thought that either the OS used was different or the command was wrong.
Amazon Linux installs packages with yum instead of apt.

profile picture
EXPERT
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago
0

You may find the packages are not available in the Amazon managed repository. You may need to add a 3rd party Repo to install packages as AWS may not maintain or add said packages to their repos.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/add-repositories.html

profile picture
EXPERT
answered 10 months ago
0

Try this way

  • <package-name> with the actual name of the package you want to install sudo yum install <package-name>
  • If you have a list of multiple packages you want to install, you can specify them separated by spaces sudo yum install <package1> <package2> <package3>
  • If you want to search for a specific package, you can use the yum search command sudo yum search <package-name>
profile picture
answered 10 months 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