错误:sudo:amazon-linux-extras:找不到命令

Mas*_*shi 8 ssh amazon-ec2 ubuntu-20.04

系统信息: Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-1045-aws x86_64)

问题:尝试运行sudo amazon-linux-extras install epel -ysudo yum install -y chromium因为我的 Discord 机器人需要它,但出现以下错误:

不和谐机器人错误:

Mashwishi using command cyt!price
/home/container/node_modules/node-html-to-image/node_modules/puppeteer-cluster/dist/Cluster.js:120
                    throw new Error(`Unable to launch browser, error message: ${err.message}`);
                          ^

Error: Unable to launch browser, error message: Failed to launch the browser process!
/home/container/node_modules/node-html-to-image/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md

    at Cluster.<anonymous> (/home/container/node_modules/node-html-to-image/node_modules/puppeteer-cluster/dist/Cluster.js:120:27)
    at Generator.throw (<anonymous>)
    at rejected (/home/container/node_modules/node-html-to-image/node_modules/puppeteer-cluster/dist/Cluster.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Run Code Online (Sandbox Code Playgroud)

因此,我去查看了有关在运行 Amazon-Linux 的 AWS EC2 实例上运行 Puppeteer进行故障排除的文章,因为我们正在运行 Amazon AWS EC2。所以我尝试了命令:

sudo amazon-linux-extras install epel -y
Run Code Online (Sandbox Code Playgroud)

错误是: sudo: amazon-linux-extras: command not found

sudo yum install -y chromium
Run Code Online (Sandbox Code Playgroud)

错误是: sudo: yum: command not found

小智 -1

如果您尝试在机器上安装 Java --Amazon Linux 2023 AMI 2023,

如果您收到的错误是

sudo:amazon-linux-extras:找不到命令

这里帮助成功安装Java的命令是

sudo dnf install java-11-amazon-corretto -y
Run Code Online (Sandbox Code Playgroud)