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(-)
相关推荐
fpcc5 小时前
工具使用—git add命令分析说明
git·工具
独隅10 小时前
VS Code Git 工作树多分支并行开发实战指南
大数据·git·elasticsearch
丑过三八线16 小时前
Git 合并未合并分支完整教程
git
qq_349447951 天前
Linux系统,安装git,从使用git下载仓库(GitHub, Gitee, GitLab 等),并且使用ssh密钥,可以直接执行git pull
linux·git·ssh
凯尔萨厮2 天前
Git(学习笔记)
笔记·git·学习
一技安身2 天前
【Git】零基础入门实战教程(Windows 完整版,适配竞赛仓库)
windows·git
LXY_BUAA2 天前
Git_在飞牛中部署 GitLab_20260817
git·gitlab
阳墨余2 天前
Git 同时管理 Gitee 和 GitHub 的 SSH 配置实战
git·gitee·github
fengyehongWorld2 天前
Git 认证凭据管理
git
暮云星影3 天前
git版本发布
git·gitee·github·gitea