sudo apt upgrade git 报错

报错:sudo apt upgrade git

mariadb-common

E: Sub-process /usr/bin/dpkg returned an error code (1)

skywalk@ubjail1:~/github/moltbot$ sudo apt upgrade apt

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

apt is already the newest version (2.4.14).

Calculating upgrade... Done

The following packages will be upgraded:

dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv

libapache2-mod-php8.1 libavahi-client3 libavahi-common-data libavahi-common3 libcaca0 libglib2.0-0 libglib2.0-bin

libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libpng-dev libpng-tools libpng16-16 libsodium-dev libsodium23

libtasn1-6 libtasn1-6-dev libtasn1-doc libxslt1-dev libxslt1.1 locales mariadb-server mariadb-server-10.6 openssl

php8.1 php8.1-cli php8.1-common php8.1-fpm php8.1-mysql php8.1-opcache php8.1-readline screen

43 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

24 not fully installed or removed.

Need to get 0 B/24.9 MB of archives.

After this operation, 13.3 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

Extracting templates from packages: 100%

Preconfiguring packages ...

Setting up mariadb-common (1:10.6.23-0ubuntu0.22.04.1) ...

update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist

dpkg: error processing package mariadb-common (--configure):

installed mariadb-common package post-installation script subprocess returned error exit status 2

Errors were encountered while processing:

mariadb-common

E: Sub-process /usr/bin/dpkg returned an error code (1)

重新配置包

复制代码
sudo dpkg --configure -a

不行,还是报错

dpkg: error processing package mariadb-server-10.6 (--configure):

dependency problems - leaving triggers unprocessed

Processing triggers for mailcap (3.70+nmu1ubuntu1) ...

Processing triggers for libc-bin (2.35-0ubuntu3.12) ...

Errors were encountered while processing:

mariadb-common

mariadb-client-core-10.6

libmariadb3:amd64

mariadb-client-10.6

mariadb-server-core-10.6

mariadb-server-10.6

skywalk@ubjail1:~/github/moltbot$ sudo apt upgrade git

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

git is already the newest version (1:2.34.1-1ubuntu1.15).

Calculating upgrade... Done

The following packages will be upgraded:

dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv

libapache2-mod-php8.1 libavahi-client3 libavahi-common-data libavahi-common3 libcaca0 libglib2.0-0 libglib2.0-bin

libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libpng-dev libpng-tools libpng16-16 libsodium-dev libsodium23

libtasn1-6 libtasn1-6-dev libtasn1-doc libxslt1-dev libxslt1.1 locales mariadb-server mariadb-server-10.6 openssl

php8.1 php8.1-cli php8.1-common php8.1-fpm php8.1-mysql php8.1-opcache php8.1-readline screen

43 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

5 not fully installed or removed.

Need to get 0 B/24.9 MB of archives.

After this operation, 13.3 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

Extracting templates from packages: 100%

Preconfiguring packages ...

Setting up mariadb-common (1:10.6.23-0ubuntu0.22.04.1) ...

update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist

dpkg: error processing package mariadb-common (--configure):

installed mariadb-common package post-installation script subprocess returned error exit status 2

Errors were encountered while processing:

mariadb-common

E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方法 尝试‌完全清除并重新安装‌:

复制代码
sudo apt purge mariadb-common mariadb-client-core-10.6 mariadb-client-10.6
sudo apt install mariadb-common mariadb-client-core-10.6 mariadb-client-10.6

安装完毕之后,再安装git等就ok了

git

正常

复制代码
git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (4/4), done.
remote: Total 5 (delta 4), reused 4 (delta 4), pack-reused 1 (from 1)
Unpacking objects: 100% (5/5), 1.67 KiB | 243.00 KiB/s, done.
From https://github.com/moltbot/moltbot
   718bc3f9c..6372242da  main       -> origin/main
Updating 718bc3f9c..6372242da
Fast-forward
 ui/src/ui/app-chat.ts             | 17 ++++++++++++++++-
 ui/src/ui/app-gateway.ts          |  8 ++++++++
 ui/src/ui/app-lifecycle.ts        |  6 +++---
 ui/src/ui/app-render.helpers.ts   | 52 +++++++++++++++++++++++++++++++++++++++++++++-------
 ui/src/ui/app.ts                  |  1 +
 ui/src/ui/controllers/sessions.ts | 21 ++++++++++++++++-----
 6 files changed, 89 insertions(+), 16 deletions(-)
相关推荐
无限进步_8 小时前
面试题 02.04. 分割链表 - 题解与详细分析
c语言·开发语言·数据结构·git·链表·github·visual studio
甲枫叶17 小时前
【claude】Claude Code正式引入Git Worktree原生支持:Agent全面实现并行独立工作
java·人工智能·git·python·ai编程
0xwang21 小时前
Deepin25社区版修改Git编码
git
第七序章1 天前
【Linux学习笔记】git三板斧
linux·运维·服务器·笔记·git·学习
三无少女指南1 天前
开发者环境配置最佳实践:编辑器Cursor ,VS Code的上位体验实现 AI 与 WSL 联动
运维·c语言·数据库·windows·git·编辑器
Rhystt1 天前
furryCTF 题解|Web方向|保姆级详解|固若金汤、DeepSleep
git·python·安全·web安全·网络安全
头发那是一根不剩了2 天前
Git 常用命令
git
x-cmd2 天前
[x-cmd] x git - Git 命令增强工具
git·终端·命令行·x-cmd
程序员果子2 天前
Git从零到远程协作:手把手实战指南
git
猫头虎2 天前
OpenClaw 常用操作命令完整速查手册:终端 CLI 操作指令详解|聊天斜杠指令详情
运维·git·容器·开源·github·aigc·ai编程