使用下列命令安装宝塔面板(Ubuntu版本)
wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed8484bec
随即出现yum没有安装的错误
Command 'yum' not found, did you mean:
command 'gum' from snap gum (0.13.0)
command 'num' from deb quickcal (2.4-1)
command 'sum' from deb coreutils (8.32-4.1ubuntu1)
command 'zum' from deb perforate (1.2-5.1)
command 'uum' from deb freewnn-jserver (1.1.1~a021+cvs20130302-7build1)
command 'yum4' from deb nextgen-yum4 (4.5.2-6)
See 'snap info <snapname>' for additional versions.
apt-get install build-essential
出现如下结果
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
build-essential set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
使用如下命令安装yum
apt-get install yum
然后出现找不到程序包yum错误
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package yum
先备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
打开文件:使用如下命令打开文件
sudo vim /etc/apt/sources.list
将原有的内容全部删除,替换成如下内容
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
注:因为使用的是vim打开,下列提供一些简便快捷键操作
sudo apt update
输入如下命令在此尝试安装yum
sudo apt-get install yum
输入安装yum命令之后,出现python版本问题
The following packages have unmet dependencies:
python3-six : Breaks: libpython-stdlib (< 2.7.18) but 2.7.5-5ubuntu3 is to be installed
Breaks: python-minimal (< 2.7.18) but 2.7.5-5ubuntu3 is to be installed
python3-yaml : Breaks: libpython-stdlib (< 2.7.18) but 2.7.5-5ubuntu3 is to be installed
Breaks: python-minimal (< 2.7.18) but 2.7.5-5ubuntu3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
尝试安装python-minimal和libpython-stdlib软件包
sudo apt-get install python-minimal libpython-stdlib
然后重新尝试安装yum,执行下列一步,我的yum就安装成功了
sudo apt-get install yum
然后验证是否安装成功
sudo yum version
出现如下则代表安装成功
Installed: $releasever/x86_64 0:da39a3ee5e6b4b0d3255bfef95601890afd80709
version
然后使用如下脚本安装宝塔面板即可,耐心等待几分钟即可
wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed8484bec
随即出现如下提示便是成功了,然后使用其提供的外网面板地址和账号密码登陆即可