我只是想知道 Ubuntu 从 Debian 中获取了多少包或包的百分比,用于驻留在 main、restricted、universe 和 multiverse 中的所有包。
此外,如果您链接一些更可信的参考资料或来源,那就太棒了。
我只是想知道 Ubuntu 从 Debian 中获取了多少包或包的百分比,用于驻留在 main、restricted、universe 和 multiverse 中的所有包。
此外,如果您链接一些更可信的参考资料或来源,那就太棒了。
我在 Docker Registry 上有 2 个映像,所以我的要求是创建 Debian 包来提取这 2 个映像并在已安装的机器上运行。我的问题是如果我想使用 Docker 命令,Docker 应该安装在给定的机器上。所以Docker已经安装好了,然后我们就可以使用它了。否则,我必须在安装该 Debian 软件包时安装它。
我的DEBIAN/control
文件看起来像这样
Package: bla-bla
Version: 1.0
Architecture: all
Priority: optional
Maintainer: Bla Bla <[email protected]>
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
我不时添加Docker
and 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
在我的包中运行另一个命令。我该如何解决这个问题?这应该是一次性的过程。
在 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.ttf
infonts-noto-core
和 Black 和 Thin 变体fonts-noto-extra
。
我查了一下,Debian Unstable 仍然有东方和西方的变种,它们也在 Google Noto 页面上列出。
所以我想知道为什么 Ubuntu 不再提供这些变体。我看不出上游有统一的变体。问题是我们的生产系统在两个 Ubuntu 版本上都运行,因此任何一种字体都会在一个系统上失败。
有人知道 20.04 年 Noto Sans 叙利亚家庭发生了什么吗?
我一直在跟踪portaudio library 的补丁,我想知道我是否正确跟踪:
在启动板中搜索 Debian 源提供的版本号(如我刚才提到的链接中所示),在我看来,这个补丁最近已合并到即将发布的 Groovy (20.10) 版本中,并且暂时没有向后移植到任何现有版本。
我是否正确跟踪此类问题?
并且根据版本编号方案(我是外星人)判断,作为一种猜测,关于这个补丁使它成为已经发布的 Ubuntu 版本的可能性,例如最新的 LTS(20.04 AFAIK)。
谢谢!
我正在构建一个 .deb 文件,但无法找到 Ubuntu 软件安装程序在哪里寻找应用程序图标。
这不是来自 .desktop 文件的运行时。.deb 由软件安装程序打开
我说的是当您通过软件安装程序打开 .deb 文件时,某些 .deb 实际上会显示应用程序图标,而不是框内的默认齿轮。
我想通过在安装过程中显示应用程序图标来将这个 .deb 的创建提升到更专业的水平。
我试图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
文件,什么配置?
我对此完全陌生,正在为练习实验室设置路由器和客户端。客户端可以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
我编写了一个 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 发行版。
感谢您的时间。
我想在我的ubuntu18.04LTS命令提示符中打开sublime文本编辑器来访问我的工作。
当我尝试在 Ubuntu 终端中更新(源 .bashrc)我的 .bashrc 以更改别名时,出现错误
bash: ./.bashrc: line 34: syntax error near unexpected token `then'
bash: ./.bashrc: line 34: `if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then'
这是关于.bashrc中的这段代码:
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
在 .bashrc 的顶部添加 set -x,我得到以下关于输出的额外信息:
+ source .bashrc
++ case $- in
++ HISTCONTROL=ignoreboth
++ shopt -s histappend
++ HISTSIZE=1000
++ HISTFILESIZE=2000
++ shopt -s checkwinsize
++ '[' -x /usr/bin/lesspipe ']'
+++ SHELL=/bin/sh
+++ lesspipe
++ eval 'export LESSOPEN="| /usr/bin/lesspipe %s";
export LESSCLOSE="/usr/bin/lesspipe %s %s";'
+++ export 'LESSOPEN=| /usr/bin/lesspipe %s'
+++ LESSOPEN='| /usr/bin/lesspipe %s'
+++ export 'LESSCLOSE=/usr/bin/lesspipe %s %s'
+++ LESSCLOSE='/usr/bin/lesspipe %s %s'
我已通过 /etc/skel 将我的 .bashrc 恢复为默认值,但错误仍然出现,因为这部分代码似乎是默认值。下面是我完整的 .bashrc 文件。
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export HOME_T_exp=/home/boris/Tetra
export HTB=$HOME_T_exp/bin
export P_plot=$HOME_T_exp/P_plot
export PATH=$PATH:.:$HOME_T_exp/bin:$P_plot/uscr
alias vb='vi .bashrc'
alias sb='source .bashrc'
alias ci='vi'
alias hom='cd /home/boris'
alias pic='cd ~/Pictures'
alias tet='cd ~/Tetra'
alias dat='cd ~/Tetra/Data'
alias mrg='cd ~/Tetra/Data/Merge_data'
alias rd='cd ~/Tetra/Run_Mediterranean'
alias rf='cd ~/Tetra/Run_Mediterranean/Run_faults'
alias rnf='cd ~/Tetra/Run_Mediterranean/Run_nofaults'
alias rf1='cd ~/Tetra/Run_Mediterranean/Run_onepar_faults'
alias rnf1='cd ~/Tetra/Run_Mediterranean/Run_onepar_nofaults'
alias if='cd ~/Tetra/Run_Mediterranean/Run_faults/I_0'
alias inf='cd ~/Tetra/Run_Mediterranean/Run_nofaults/I_0'
alias if1='cd ~/Tetra/Run_Mediterranean/Run_onepar_faults/I_0'
alias inf1='cd ~/Tetra/Run_Mediterranean/Run_onepar_nofaults/I_0'
alias sf='cd ~/Tetra/Run_Mediterranean/Run_faults/SYNTH'
alias snf='cd ~/Tetra/Run_Mediterranean/Run_nofaults/SYNTH'
alias sf1='cd ~/Tetra/Run_Mediterranean/Run_onepar_faults/SYNTH'
alias snf1='cd ~/Tetra/Run_Mediterranean/Run_onepar_nofaults/SYNTH'
alias src='cd ~/Tetra/Src'
alias bin='cd ~/Tetra/bin'
alias ppl='cd ~/Tetra/P_plot'
alias tsh='cd /media/boris/toshiba'
alias sdm='sudo mount /dev/sda1/media/boris/toshiba'
alias gf='gfortran'
export T=~/Tetra
export P=$T/P_plot
export IMagick=/home/boris
export MAGICK_HOME=$IMagick/ImageMagick-7.0.8-23
export DYLD_LIBRARY_PATH=$MAGICK_HOME/lib
export PATH=$MAGICK_HOME/utilities:$PATH
export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"
有谁知道这个问题的解决方案?