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(-)
相关推荐
深海鱼在掘金2 小时前
Git 完全指南 —— 第1章:Git 概览与版本控制演进
git
noravinsc21 小时前
关于Git Flow
git
蜜獾云1 天前
在Git中配置用户名和密码
git
scx_link1 天前
通过git bash在本地创建分支,并推送到远程仓库中
开发语言·git·bash
南大白1 天前
IntelliJ IDEA 运行时的 JVM 本地内存溢出崩溃
git
码农小旋风1 天前
Claude Code 基础用法大全:对话、分析、修改、测试、Git 和工作流
人工智能·git·chatgpt·claude
南大白1 天前
Git 撤回提交完整方案
git
像风一样的男人@1 天前
python --实现代理服务器
git·ui
sbjdhjd1 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
码云数智-大飞1 天前
Go Channel 详解:并发通信的正确姿势
前端·数据库·git