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(-)
相关推荐
赵庆明老师12 分钟前
Vben精讲:04-了解VSCode中的Git
ide·git·vscode
Irissgwe6 小时前
第 5 篇:Git 分支基础:branch、checkout、merge 和冲突解决
git
liberalhumblehopeful9 小时前
git代码管理-分支差距过大如何进行同步
git
一只楚楚猫13 小时前
一篇文章入门Git工具
git
Irissgwe15 小时前
第 6 篇:Git 分支进阶:分支策略、stash、bugfix 和 feature 开发
git
wok15715 小时前
Git Bash 执行中文命令报错 127:MSYS 参数编码 bug 排查与修复
git·bug·bash
霸道流氓气质1 天前
CodeBuddy中使用 MCP 工具将 XMind 思维导图转换为 Markdown —— 实操流程汇总
git·myeclipse·xmind
OsDepK1 天前
mimo code安装教程
git·电脑·ai编程
NexTunnel2 天前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
满天星83035772 天前
【Git】原理及使用(七) (多人协作 [下])
git