Vonng / pigsty

Battery-Included PostgreSQL Distro as a Free RDS Alternative
https://pigsty.io
GNU Affero General Public License v3.0
3.01k stars 242 forks source link

Ubuntu 22.04.3 LTS installation failure #347

Closed Michael2008S closed 7 months ago

Michael2008S commented 8 months ago

ansible 错误信息如下:

TASK [node : install default node packages] ********************************************************************************************************************************************************************************************************************************
failed: [192.168.18.171] (item=lz4,unzip,bzip2,zlib1g,pv,jq,git,ncdu,make,patch,bash,lsof,wget,uuid,tuned,linux-tools-generic,nvme-cli,numactl,sysstat,iotop,htop,rsync,tcpdump,acl,python3,python3-pip) => {"ansible_loop_var": "item", "cache_update_time": 1701267226, "cache_updated": false, "changed": false, "item": "lz4,unzip,bzip2,zlib1g,pv,jq,git,ncdu,make,patch,bash,lsof,wget,uuid,tuned,linux-tools-generic,nvme-cli,numactl,sysstat,iotop,htop,rsync,tcpdump,acl,python3,python3-pip", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'lz4' 'pv' 'git' 'ncdu' 'uuid' 'tuned' 'linux-tools-generic' 'nvme-cli' 'numactl' 'sysstat' 'iotop' 'python3-pip'' failed: E: Unable to correct problems, you have held broken packages.\n", "rc": 100, "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n gawk:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not going to be installed\n             PreDepends: libgmp10:i386 (>= 2:6.2.1+dfsg) but it is not installable\n             PreDepends: libmpfr6:i386 (>= 3.1.3) but it is not going to be installed\n             PreDepends: libreadline8:i386 (>= 6.0) but it is not installable\n             PreDepends: libsigsegv2:i386 (>= 2.9) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " gawk:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not going to be installed", "             PreDepends: libgmp10:i386 (>= 2:6.2.1+dfsg) but it is not installable", "             PreDepends: libmpfr6:i386 (>= 3.1.3) but it is not going to be installed", "             PreDepends: libreadline8:i386 (>= 6.0) but it is not installable", "             PreDepends: libsigsegv2:i386 (>= 2.9) but it is not going to be installed"]}
ok: [192.168.18.171] => (item=netcat,socat,ftp,lrzsz,net-tools,ipvsadm,dnsutils,telnet,ca-certificates,openssl,openssh-client,libreadline-dev,vim-tiny,keepalived,node-exporter,etcd,haproxy)

PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************
192.168.18.171             : ok=26   changed=11   unreachable=0    failed=1    skipped=19   rescued=0    ignored=0   
localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0 

错误格式化:

{
  "ansible_loop_var": "item",
  "cache_update_time": 1701267226,
  "cache_updated": false,
  "changed": false,
  "item": "lz4,unzip,bzip2,zlib1g,pv,jq,git,ncdu,make,patch,bash,lsof,wget,uuid,tuned,linux-tools-generic,nvme-cli,numactl,sysstat,iotop,htop,rsync,tcpdump,acl,python3,python3-pip",
  "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'lz4' 'pv' 'git' 'ncdu' 'uuid' 'tuned' 'linux-tools-generic' 'nvme-cli' 'numactl' 'sysstat' 'iotop' 'python3-pip'' failed: E: Unable to correct problems, you have held broken packages.\n",
  "rc": 100,
  "stderr": "E: Unable to correct problems, you have held broken packages.\n",
  "stderr_lines": [
    "E: Unable to correct problems, you have held broken packages."
  ],
  "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n gawk:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not going to be installed\n             PreDepends: libgmp10:i386 (>= 2:6.2.1+dfsg) but it is not installable\n             PreDepends: libmpfr6:i386 (>= 3.1.3) but it is not going to be installed\n             PreDepends: libreadline8:i386 (>= 6.0) but it is not installable\n             PreDepends: libsigsegv2:i386 (>= 2.9) but it is not going to be installed\n",
  "stdout_lines": [
    "Reading package lists...",
    "Building dependency tree...",
    "Reading state information...",
    "Some packages could not be installed. This may mean that you have",
    "requested an impossible situation or if you are using the unstable",
    "distribution that some required packages have not yet been created",
    "or been moved out of Incoming.",
    "The following information may help to resolve the situation:",
    "",
    "The following packages have unmet dependencies:",
    " gawk:i386 : PreDepends: libc6:i386 (>= 2.34) but it is not going to be installed",
    "             PreDepends: libgmp10:i386 (>= 2:6.2.1+dfsg) but it is not installable",
    "             PreDepends: libmpfr6:i386 (>= 3.1.3) but it is not going to be installed",
    "             PreDepends: libreadline8:i386 (>= 6.0) but it is not installable",
    "             PreDepends: libsigsegv2:i386 (>= 2.9) but it is not going to be installed"
  ]
}

操作系统信息:

michael@ub2204dp2Pigsty ~/pigsty> cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
Vonng commented 8 months ago
  1. 推荐优先使用 EL 系操作系统
  2. 遇到包冲突问题,可以尝试直接从上游安装,不使用离线软件包

https://doc.pigsty.cc/#/zh/FAQ?id=%e5%ae%89%e8%a3%85

komiblog commented 3 months ago

请问最后是怎么解决的呢?我运行了常见问题的那几行命令,在 ./infra.yml -t repo_pkg 时报错: 图片 我查看了 ./infra.yml 发现似乎默认是centos系的软件源? 我的操作系统信息:

PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

期待答复

komiblog commented 3 months ago

解决了。方法是先设置软件源,然后使用 sudo apt update && sudo apt upgrade 更新,最后用 sudo apt install *** 手动安装缺失的包。