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
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[debian](ubuntu)

Martin Hope
Viru
Asked: 2024-12-24 01:53:15 +0800 CST

为什么我的项目使用 docker build 发布 Debian 自定义镜像时的输出在本地运行与在 Github 操作时不同?

  • 3

我有一个小项目,它从 debian.org 获取最新的 Debian 最小快照,并在应用一系列 dockerfile 和 shell 脚本后输出 gzip 映像。可以使用 rufus 或类似工具将此 gzip 直接写入磁盘,并且可以在任何兼容硬件上启动。

但是,我遇到了一个奇怪的问题。在 Git Bash 中本地运行时,输出图像工作正常,但在 Github 上使用操作运行时,最终图像无法启动。启动时出现以下错误: Boot_error_GitHub_Actions_Image

请帮助我了解本地 GitBash 与 GitHub Actions 项目执行有何不同。

以下是我在 GitHub 上的构建流程:

`linux-os.yml
    -> build.sh (*uses a dockerfile & calls methods from buildhelper.sh*)
        -> buildhelper.sh (*It has all the methods like docker build*)
            -> squash-me.sh (*It has methods to configure the root partition of OS*)
`

以上完整流程在 GitHub 操作上运行。然而,在本地 Git bash 上,我直接调用 build.sh。启动屏幕上出现的那种错误,似乎在 GitHub 操作上调用 squash-me.sh 时发生了一些奇怪的事情,因此,启动期间根分区无法加载。

debian
  • 1 个回答
  • 40 Views
Martin Hope
malat
Asked: 2024-06-19 21:36:06 +0800 CST

在 Ubuntu 22.04 上创建 Debian sid chroot

  • 6

从我的 Debian/stable 系统中,我可以简单地为某个游乐场创建一个 chroot,如下所示:

% cd /tmp
% sudo debootstrap sid ./sid-chroot http://deb.debian.org/debian   
[...]
I: Configuring libc-bin...
I: Base system installed successfully.

然而,我在 Ubuntu 系统上看到的内容如下:

% cd /tmp
% sudo rm -rf sid-chroot
% sudo debootstrap sid ./sid-chroot http://deb.debian.org/debian        
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id A7236886F3CCCAAD148A27F80E98404D386FA1D9)
[...]
I: Validating zlib1g 1:1.3.dfsg+really1.3.1-1
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting apt...
I: Extracting base-files...
E: Tried to extract package, but file already exists. Exit...

我不明白这个错误信息是什么意思?我做错了什么?

以供参考:

% cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
debian
  • 1 个回答
  • 69 Views
Martin Hope
Kratos
Asked: 2021-05-19 05:07:21 +0800 CST

有多少百分比的软件包(主要受限宇宙多元宇宙)来自 Debian?

  • 1

我只是想知道 Ubuntu 从 Debian 中获取了多少包或包的百分比,用于驻留在 main、restricted、universe 和 multiverse 中的所有包。

此外,如果您链​​接一些更可信的参考资料或来源,那就太棒了。

debian
  • 1 个回答
  • 65 Views
Martin Hope
tikirin tukurun
Asked: 2020-10-18 22:12:48 +0800 CST

如何使用另一个 Debian 软件包安装 Docker?

  • 0

我在 Docker Registry 上有 2 个映像,所以我的要求是创建 Debian 包来提取这 2 个映像并在已安装的机器上运行。我的问题是如果我想使用 Docker 命令,Docker 应该安装在给定的机器上。所以Docker已经安装好了,然后我们就可以使用它了。否则,我必须在安装该 Debian 软件包时安装它。

我的DEBIAN/control文件看起来像这样

Package: bla-bla
Version: 1.0
Architecture: all
Priority: optional
Maintainer: Bla Bla <bla.bla@bla.com>
Installed-Size: 327000
Depends: unzip, curl, sqlite3, libsqlite3-dev, xdg-utils, apt-transport-https, ca-certificates, software-properties-common
Homepage: https://www.example.com/
Section: Network, Databases, Web Servers, JavaScript, Python;
Description: bla bla bla

我不时添加Dockerand docker,但它没有用。所以我在文件中Depends添加了以下行,preinst

function check_whether_docker_installed() {
  service=docker
  is_running=$(ps aux | grep -v grep | grep -v "$0" | grep $service | wc -l | awk '{print $1}')

  if [ $is_running != "0" ]; then
    echo -e "\nservice $service is running"
  else
    initd=$(ls /etc/init.d/ | grep $service | wc -l | awk '{ print $1 }')

    if [ $initd = "1" ]; then
      startup=$(ls /etc/init.d/ | grep $service)
      echo -e "\nStarting Docker service"
      /etc/init.d/${startup} start
      echo "Docker service successfully started"
    else
      echo -e "\nService $service not yet installed, going to install it"
      sudo apt update
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
      sudo apt update
      apt-cache policy docker-ce
      sudo apt install -y docker-ce
      sudo chmod +x /var/run/docker.sock
      echo "Docker successfully installed, let's check it again"
      check_whether_docker_installed
    fi
  fi
}

function download_and_install_docker_compose() {
  which docker-compose

  if [ $? -eq 0 ]; then
    echo -e "\ndocker-compose is installed!"
  else
    echo -e "\ndocker-compose is not installed!"
    sudo curl -L "https://github.com/docker/compose/releases/download/1.27.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    echo "docker-compose is successfully installed, let's check it again"
    download_and_install_docker_compose
  fi
}

check_whether_docker_installed
download_and_install_docker_compose

sudo apt install -y docker-ce这条线无法运行。它给了我以下错误。

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
chmod: cannot access '/var/run/docker.sock': No such file or directory

是的,我知道会发生这种情况,因为我已经在运行sudo apt install my_package.deb安装我的包,所以不能sudo apt install在我的包中运行另一个命令。我该如何解决这个问题?这应该是一次性的过程。

debian bash deb debian-installer docker
  • 1 个回答
  • 169 Views
Martin Hope
Frederik
Asked: 2020-10-02 07:02:51 +0800 CST

Ubuntu 20.04 不再包含字体 Noto Sans 叙利亚语东部

  • 0

在 Ubuntu 18.04 中,该软件包fonts-noto-unhinted包含字体 Noto Sans叙利亚东方,即/usr/share/fonts/truetype/noto/NotoSansSyriacEastern-Regular.ttf. 但是,在 Ubuntu 20.04 中,没有包包含该字体。中只有/usr/share/fonts/truetype/noto/NotoSansSyriac-Regular.ttfinfonts-noto-core和 Black 和 Thin 变体fonts-noto-extra。

我查了一下,Debian Unstable 仍然有东方和西方的变种,它们也在 Google Noto 页面上列出。

所以我想知道为什么 Ubuntu 不再提供这些变体。我看不出上游有统一的变体。问题是我们的生产系统在两个 Ubuntu 版本上都运行,因此任何一种字体都会在一个系统上失败。

有人知道 20.04 年 Noto Sans 叙利亚家庭发生了什么吗?

debian packaging fonts
  • 1 个回答
  • 1838 Views
Martin Hope
matanster
Asked: 2020-09-27 09:03:40 +0800 CST

来自 Debian 的包集成过程的例子:portaudio

  • 3

我一直在跟踪portaudio library 的补丁,我想知道我是否正确跟踪:

在启动板中搜索 Debian 源提供的版本号(如我刚才提到的链接中所示),在我看来,这个补丁最近已合并到即将发布的 Groovy (20.10) 版本中,并且暂时没有向后移植到任何现有版本。

我是否正确跟踪此类问题?

并且根据版本编号方案(我是外星人)判断,作为一种猜测,关于这个补丁使它成为已经发布的 Ubuntu 版本的可能性,例如最新的 LTS(20.04 AFAIK)。

谢谢!

debian
  • 1 个回答
  • 175 Views
Martin Hope
user3450148
Asked: 2020-09-22 17:51:24 +0800 CST

软件安装程序在哪里寻找应用程序图标

  • 0

我正在构建一个 .deb 文件,但无法找到 Ubuntu 软件安装程序在哪里寻找应用程序图标。

这不是来自 .desktop 文件的运行时。.deb 由软件安装程序打开

我说的是当您通过软件安装程序打开 .deb 文件时,某些 .deb 实际上会显示应用程序图标,而不是框内的默认齿轮。

我想通过在安装过程中显示应用程序图标来将这个 .deb 的创建提升到更专业的水平。

software-installation debian
  • 1 个回答
  • 61 Views
Martin Hope
milanHrabos
Asked: 2020-09-04 07:24:05 +0800 CST

dpkg:不可恢复的致命错误,中止:未知系统组[重复]

  • 2
这个问题在这里已经有了答案:
无法在 ubuntu 中升级 1 个回答
2年前关闭。

我试图inkscape安装

$sudo apt-get install inkscape

但我得到一个错误:

dpkg: unrecoverable fatal error, aborting:
 unknown system group 'smmsp' in statoverride file; the system group got removed
before the override, which is most probably a packaging bug, to recover you
can remove the override manually with dpkg-statoverride
E: Sub-process /usr/bin/dpkg returned an error code (2)

我应该删除smmsp导致错误的那个组吗?甚至在这里是什么意思system group?什么是statoverride文件,什么配置?

package-management debian dpkg apt
  • 1 个回答
  • 2225 Views
Martin Hope
Bryan
Asked: 2020-08-27 21:08:25 +0800 CST

客户端(Ubuntu 20.04)无法访问互联网,但路由器是(Debian 10.5)

  • 1

我对此完全陌生,正在为练习实验室设置路由器和客户端。客户端可以ping通路由器,路由器也可以ping通客户端。路由器可以访问互联网,但客户端不能。我不知道为什么会这样,有人可以帮忙吗?

这是我所有的设置。

客户端 /etc/netplan/01-network-manager-all.yaml

network:
    version: 3
    renderer: networkd
    ethernets:
      enp0s3:
        dhcp4: no
        addresses:
          - 10.0.20.21/24
        gateway4: 10.0.20.1
        nameservers:
          addresses: [10.0.20.15, 8.8.8.8]

路由器:/etc/network/interfaces

source /etc/nework/interfaces.d/*

auto lo
iface lo inet loopback

#NAT Network
allow-hotplug enp0s3
iface enp0s3 inet static
address 10.0.2.15
netmask 255.255.255.0
gateway 10.0.2.2
dns-nameserver 10.0.0.1
dns-nameserver 8.8.8.8
pre-up iptables-restore < /etc/iptables.rules

#Internal Network
allow-hotplug enp0s8
iface enp0se8 static 
address 10.0.20.15
netmask 255.255.255.0
gateway 10.0.20.15
network 10.0.20.0
broadcast 10.0.20.255

iptables 规则

iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE
iptables -A FORWARD -i enp0s3 -o enp0s8 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i enp0s8 -o enp0s3 -j ACCEPT
networking iptables debian internet
  • 1 个回答
  • 1222 Views
Martin Hope
FeralShadow
Asked: 2020-05-27 09:47:09 +0800 CST

使用 SUDO 运行 python 脚本时找不到 Scapy 模块

  • 0

我编写了一个 python 脚本,它使用from scapy.all import *并且 sniff() 函数需要提升的权限,所以当我运行时,python3 scapyScript.py我收到了PermissionError: [Errno 1] Operation not permitted有意义的错误。

但是,当我跑步时,sudo python3 scapyScript.py我收到ModuleNotFoundError: No module named 'scapy'.

我相信这是因为我没有使用 sudo 访问安装 scapy,但是当我尝试安装sudo pip3 install scapy它时说没有可识别的命令。

我似乎无法找到任何关于此的具体内容,有人有任何想法吗?

我正在使用 Debian 9.3.0-10 发行版。

感谢您的时间。

scripts debian python python3 scapy
  • 1 个回答
  • 7040 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve