RockyLinux上加入Playwright支持

最近写的一个自动化程序需要go-playwright支持,但开发和部署环境是RockyLinux9, playwright安装依赖的时候是基于Ubuntu的,下面是在Rockey Linux环境下的解决办法。

安装Distrobox

dnf install epel-release
dnf install distrobox

创建ubuntu容器

distrobox create -n ubuntu --image ubuntu:24.04

进入ubuntu容器

distrobox enter ubuntu

在容器中安装golang,playwright及其依赖

wget https://golang.google.cn/dl/go1.25.5.linux-amd64.tar.gz && \
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz && \
export GOPROXY=https://goproxy.cn,direct && \
go install github.com/playwright-community/playwright-go/cmd/playwright@latest && \
playwright install --with-deps

运行程序

distrobox enter ubuntu -- [执行的命令]
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇