如果您看到文档
-t, --virtual NAME Instead of adding all the packages to 'world', create a new virtual package with the listed dependencies and add that to 'world'; the actions of the command are easily reverted by deleting the virtual package
这意味着在安装软件包时,这些软件包不会添加到全局软件包中。而且此更改可以轻松还原。因此,如果我需要gcc来编译程序,但是一旦程序被编译,我就不再需要gcc。
我可以在虚拟软件包及其所有依赖项中安装gcc和其他必需的软件包,并且可以删除该虚拟软件包名称中的所有内容。以下是用法示例
apk add --virtual mypacks gcc vimapk del mypacks
下一条命令将删除与第一个命令一起安装的所有18个软件包。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)