我正在尝试安装除fonts-mathematica之外的所有D1软件包。做这件事最好的方法是什么?
我从下面的命令开始:
apt-get -y install *fonts*问候,j
发布于 2020-07-14 21:21:49
我们可以使用apt新模式。使用man apt-patterns获取更多信息。
列出其名称中包含“字体”的所有包,并对它们进行计数:
$ apt list '~n.*fonts.*' 2> /dev/null | wc -l
573使用grep筛选输出以查找fonts-mathematica:
$ apt list '~n.*fonts.*' 2> /dev/null | grep -i mathematica
fonts-mathematica/focal 21 all
mathematica-fonts/focal 21 all将其排除在外:
$ apt list '~n.*fonts.* !?exact-name(fonts-mathematica)' 2> /dev/null |
grep mathematica
mathematica-fonts/focal 21 all甚至把他们两个都排除在外:
$ apt list \
'~n.*fonts.* !?exact-name(fonts-mathematica) !?exact-name(mathematica-fonts)' |
grep mathematica下面是你要找的东西:
$ sudo apt install \
'~n.*fonts.* !?exact-name(fonts-mathematica) !?exact-name(mathematica-fonts)'最后肯定会有很多冲突。
我们可以做的是生成所有这些包的列表:
$ apt list \
'~n.*fonts.* !?exact-name(fonts-mathematica) !?exact-name(mathematica-fonts)' |
cut -f1 -d/ > 2>/dev/null fonts_lists甚至以一种更清洁的方式:
$ apt-cache search --names-only fonts | grep -v -e fonts-mathematica -e mathematica-fonts | cut -f1 -d' ' > fonts_list然后使用如下指南:"当apt遇到无法定位包问题的安装时继续错误.“逐个安装它们。
https://askubuntu.com/questions/1259072
复制相似问题