AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-231647

Thomas Tempelmann's questions

Martin Hope
Thomas Tempelmann
Asked: 2024-04-29 20:01:19 +0800 CST

将 Debian 9 更新到较新版本时遇到问题

  • 5

我有一个匿名根服务器,主要运行 Web 服务(带有 php5 的 Apache)、邮件和 VPN。是时候将其更新为稳定且受支持的系统版本了。

我遵循了Debian 升级文档,但遇到了一些小(?)问题,例如当我的系统仍然使用“eth0”时,没有/etc/udev/rules.d/70-persistent-net.rules文件,所以我什至不知道如何继续。

暂时忽略这一点,我无法开始apt update工作。经过一番阅读后,我想出了这个/etc/apt/sources.list:

deb [trusted=yes] http://archive.debian.org/debian stretch main contrib non-free
deb [trusted=yes] http://security.debian.org/debian-security stretch/updates contrib main non-free

还有一个文件/etc/apt/sources.list.d/backports.list,我将其更改为:

deb [trusted=yes] http://archive.debian.org/debian stretch-backports main

apt update然后列出了几十Ign: …行和这些:

Err:3 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
  404  Not Found [IP: 199.232.190.132 80]

结尾为:

Reading package lists... Done                     
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/contrib/binary-amd64/Packages  404  Not Found [IP: 199.232.190.132 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

更新

修复“debian-security”源链接后,我尝试使用以下列表更新到buster:

deb http://ftp.de.debian.org/debian buster main contrib non-free
deb http://ftp.de.debian.org/debian buster-updates main contrib non-free
#deb http://ftp.de.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free

(向后移植链接导致另一个“无发布文件”错误,因此我将其省略。)

这导致:

# apt update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://ftp.de.debian.org/debian buster InRelease                      
Hit:3 http://ftp.de.debian.org/debian buster-updates InRelease              
The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information.
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code
debian
  • 1 个回答
  • 25 Views
Martin Hope
Thomas Tempelmann
Asked: 2024-02-24 22:40:04 +0800 CST

如何测试“find”命令的原色可用性并输出它支持哪些原色?

  • 5

我正在编写一个脚本来确定是否find支持以下原色:

  • 正则表达式
  • 时间
  • 阿泰姆
  • 带有 +/- 的 inum

到目前为止,我想出了这个:

find / -mindepth 0 -maxdepth 1 -inum +0 -exec echo "ok:inum+-" \; 2>&1 | head -n 1

仅当该命令能够理解该主节点时,它才应输出“ok:inum+-”。

问题是我依赖 find 来查找匹配项,否则它不会输出任何内容。

理想情况下,测试的主程序不应关心它发现什么,并且应始终执行回显,除非工具因错误而中止。

我意识到我可以放弃-exec echo …并检查调用的退出代码find,但是我将如何根据它打印“ok:”字符串?

哦,任何解决方案都必须是每个经过测试的初级的单行解决方案。

find
  • 1 个回答
  • 20 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve