
您可能会遇到类似于
的错误
hit:1 http://ng.archive.ubuntu.com/ubuntu lunar inrelease hit:2 http://ng.archive.ubuntu.com/ubuntu lunar-updates inrelease hit:3 https://dl.google.com/linux/chrome/deb stable inrelease hit:4 http://ng.archive.ubuntu.com/ubuntu lunar-backports inreleaseign:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar inreleaseerr:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar release 404 not found [ip: 185.125.190.80 443]hit:7 http://ng.archive.ubuntu.com/ubuntu lunar-security inreleasereading package lists... donee: the repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu lunar release' does not have a release file.n: updating from such a repository can't be done securely, and is therefore disabled by default.n: see apt-secure(8) manpage for repository creation and user configuration details.or “reading package lists… donebuilding dependency treereading state information… donee: unable to locate package php8.2e: couldn’t find any package by glob ‘php8.2’e: couldn’t find any package by regex ‘php8.2’”
可能是跑步后
add-apt-repository ppa:ondrej/php
通过运行删除之前的源
sudo add-apt-repository --remove ppa:ondrej/phpsudo apt update
您需要按如下方式编辑您的存储库源文件:
sudo nano /etc/apt/sources.list
然后输入
deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main
然后运行
sudo apt update
之后你现在应该可以安装你的php版本了,以8.3为例
sudo apt install php8.3
如果您已经安装了其他一些php,您可能需要使用
更改为版本
sudo update-alternatives --config php
按照提示操作
您也可以考虑安装以下扩展
sudo apt install php8.3-curl php8.3-gd php8.3-intl php8.3-simplexml php8.3-dom php8.3-mysql php8.3-mbstring php8.3-xml php8.3-gd php8.3-curl php8.3-mysqli php8.3-zip
以上就是在 ubuntu 上安装 PHP //的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1245117.html
微信扫一扫
支付宝扫一扫