所以,我尝试安装 git-all ,它删除了我系统中的各种 gnome 软件包,我真的不知道原因。我怎样才能克服这个问题?

所以,我尝试安装 git-all ,它删除了我系统中的各种 gnome 软件包,我真的不知道原因。我怎样才能克服这个问题?

我正在我的系统中安装 git-all ,并且没有阅读它会弄乱的软件包的确认信息,当我返回时,我的图形界面就消失了......

不知道为什么它删除了那些 gnome 软件包,但它确实删除了,那么发生了什么以及我该如何克服这个问题?

另外我是否需要安装git-all,我可以只安装git吗?这两个包有什么区别?

我认为值得一提的是,我正在使用 debian 10 'buster',而且我确实有一些非免费固件,因为我的无线卡需要它,尽管我认为这与我的问题无关......

感谢您提前提供的帮助,我今年 17 岁,对这个技术世界完全陌生,除了“hello world”之外什么都不会编写。

我之前在堆栈溢出中问过这个问题,但是凯勒姆向我解释堆栈溢出注定只适用于与编程相关的问题,所以我想对他向我展示这些网站表示感谢,所以...谢谢老兄!

我确实修改了这个网站的帮助页面、堆栈溢出和超级用户,我认为我在这里提出问题是合理的,即使它也不适合这个网站,请告诉我......

下面是输出sudo apt install git-all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  accountsservice apg appstream apt-config-icons argyll argyll-ref bolt colord-data cracklib-runtime desktop-file-utils dnsmasq-base exfat-fuse
  exfat-utils fwupd fwupd-amd64-signed gdisk gir1.2-accountsservice-1.0 gir1.2-clutter-gst-3.0 gir1.2-dazzle-1.0 gir1.2-gck-1 gir1.2-gcr-3
  gir1.2-gdm-1.0 gir1.2-gmenu-3.0 gir1.2-gnomebluetooth-1.0 gir1.2-grilo-0.3 gir1.2-ibus-1.0 gir1.2-mediaart-2.0 gir1.2-mutter-3 gir1.2-nm-1.0
  gir1.2-nma-1.0 gir1.2-packagekitglib-1.0 gir1.2-polkit-1.0 gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gnome-control-center-data gnome-session-bin
  gnome-session-common gnome-shell-common gnome-software-common gvfs-common gvfs-libs hyphen-en-us javascript-common libaccountsservice0
  libappstream-glib8 libappstream4 libatasmart4 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2
  libblockdev-swap2 libblockdev-utils2 libblockdev2 libcdio-cdda2 libcdio-paranoia2 libcolord-gtk1 libcolorhug2 libcrack2 libfwupd2 libgcab-1.0-0
  libgdm1 libgnome-menu-3-0 libibus-1.0-5 libmusicbrainz5-2 libmusicbrainz5cc2v5 libndp0 libnfs12 libnm0 libnma0 libnss-myhostname libntfs-3g883
  libparted-fs-resize0 libpolkit-agent-1-0 libpolkit-backend-1-0 libpwquality-common libpwquality1 libreoffice-help-common libreoffice-help-en-us
  libsmbios-c2 libteamdctl0 libtss2-esys0 libtss2-udev libudisks2-0 libvolume-key1 libxmlb1 mobile-broadband-provider-info mousetweaks mythes-en-us
  nautilus-data node-normalize.css ntfs-3g python3-distro-info python3-software-properties realmd software-properties-common software-properties-gtk
  switcheroo-control tpm2-abrmd tpm2-tools unattended-upgrades xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2 apache2-data apache2-utils cvs cvsps elpa-async elpa-dash elpa-ghub elpa-git-commit elpa-graphql elpa-let-alist elpa-magit
  elpa-magit-popup elpa-treepy elpa-with-editor emacs emacs-bin-common emacs-common emacs-el emacs-gtk exim4-base exim4-config exim4-daemon-light
  git git-cvs git-daemon-run git-doc git-el git-email git-gui git-man git-mediawiki git-svn gitk gitweb guile-2.2-libs imagemagick-6-common
  initscripts insserv install-info libalgorithm-c3-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-factory-util-perl libclass-inspector-perl
  libclass-method-modifiers-perl libclass-singleton-perl libclass-xsaccessor-perl libcommon-sense-perl libdata-optlist-perl
  libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl
  libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libdevel-callchecker-perl libdevel-caller-perl libdevel-lexalias-perl
  libdevel-stacktrace-perl libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl liberror-perl
  libeval-closure-perl libexception-class-perl libfcgi-perl libfile-sharedir-perl libgc1c2 libgnutls-dane0 libgsasl7 libheif1 libjson-perl
  libjson-xs-perl libkyotocabinet16v5 liblqr-1-0 liblzo2-2 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmailutils5 libmediawiki-api-perl
  libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-dns-perl
  libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl libntlm0 libotf0 libpackage-stash-perl libpackage-stash-xs-perl
  libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libreadonly-perl
  libref-util-perl libref-util-xs-perl librole-tiny-perl libserf-1-1 libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl
  libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsvn-perl libsvn1 libtcl8.6 libterm-readkey-perl libtk8.6
  libtypes-serialiser-perl libunbound8 libutf8proc2 libvariable-magic-perl libyaml-libyaml-perl libyaml-perl m17n-db mailutils mailutils-common
  runit runit-helper runit-sysv startpar sysuser-helper sysv-rc sysvinit-core tcl tcl8.6 tk tk8.6
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom mksh rcs emacs-common-non-dfsg exim4-doc-html | exim4-doc-info eximon4 spf-tools-perl
  swaks meld mediawiki subversion bootchart2 libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl m17n-docs
  libmagickcore-6.q16-6-extra libscalar-number-perl libtest-fatal-perl libyaml-shell-perl gawk mailutils-mh mailutils-doc bootlogd tcl-tclreadline
The following packages will be REMOVED:
  chrome-gnome-shell colord dbus-user-session gdm3 gnome gnome-color-manager gnome-control-center gnome-core gnome-disk-utility gnome-music
  gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-software gnome-sushi gnome-tweaks gstreamer1.0-packagekit gvfs
  gvfs-backends gvfs-daemons gvfs-fuse libpam-systemd nautilus nautilus-extension-brasero network-manager network-manager-gnome packagekit
  packagekit-tools policykit-1 rtkit systemd-sysv task-gnome-desktop udisks2
The following NEW packages will be installed:
  apache2 apache2-data apache2-utils cvs cvsps elpa-async elpa-dash elpa-ghub elpa-git-commit elpa-graphql elpa-let-alist elpa-magit
  elpa-magit-popup elpa-treepy elpa-with-editor emacs emacs-bin-common emacs-common emacs-el emacs-gtk exim4-base exim4-config exim4-daemon-light
  git git-all git-cvs git-daemon-run git-doc git-el git-email git-gui git-man git-mediawiki git-svn gitk gitweb guile-2.2-libs imagemagick-6-common
  initscripts insserv install-info libalgorithm-c3-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-factory-util-perl libclass-inspector-perl
  libclass-method-modifiers-perl libclass-singleton-perl libclass-xsaccessor-perl libcommon-sense-perl libdata-optlist-perl
  libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl
  libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libdevel-callchecker-perl libdevel-caller-perl libdevel-lexalias-perl
  libdevel-stacktrace-perl libdigest-bubblebabble-perl libdigest-hmac-perl libdynaloader-functions-perl libemail-valid-perl liberror-perl
  libeval-closure-perl libexception-class-perl libfcgi-perl libfile-sharedir-perl libgc1c2 libgnutls-dane0 libgsasl7 libheif1 libjson-perl
  libjson-xs-perl libkyotocabinet16v5 liblqr-1-0 liblzo2-2 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmailutils5 libmediawiki-api-perl
  libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-dns-perl
  libnet-dns-sec-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl libntlm0 libotf0 libpackage-stash-perl libpackage-stash-xs-perl
  libpadwalker-perl libparams-classify-perl libparams-util-perl libparams-validate-perl libparams-validationcompiler-perl libreadonly-perl
  libref-util-perl libref-util-xs-perl librole-tiny-perl libserf-1-1 libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl
  libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsvn-perl libsvn1 libtcl8.6 libterm-readkey-perl libtk8.6
  libtypes-serialiser-perl libunbound8 libutf8proc2 libvariable-magic-perl libyaml-libyaml-perl libyaml-perl m17n-db mailutils mailutils-common
  runit runit-helper runit-sysv startpar sysuser-helper sysv-rc sysvinit-core tcl tcl8.6 tk tk8.6
0 upgraded, 147 newly installed, 34 to remove and 0 not upgraded.
Need to get 80.9 MB of archives.
After this operation, 261 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

**编辑:** 好吧,我按照 ajgringo619 的建议使用了 --dry-run 开关,并在阅读速度较慢时发现它不仅删除了 gnome 软件包,还删除了诸如 nautilus、network-manager 之类的软件包。以及许多其他人,我什至不知道其目的,说不再需要这些软件包,尽管我认为下载某些东西时需要网络管理器。

至于我在此之前所做的事情:没什么,我的意思是,第一次运行时,sudo apt install git-all -y我破坏了系统并重新安装了它,因为我没有足够的知识来修复它,之后,在安装任何东西之前,任何非-免费固件我运行相同的命令并第二次破坏它,第二次重新安装后我没有避免该git-all软件包,安装了vscode,zeal,删除了系统附带的游戏,更改了背景,当我想到时安装时git-all我删除了这个-y东西并实际读取了输出。我现在在这里寻求帮助。

这些是它想要删除的软件包:

Remv chrome-gnome-shell [10.1-5]
Remv gnome [1:3.30+1]
Remv task-gnome-desktop [3.53]
Remv gnome-core [1:3.30+1]
Remv gnome-control-center [1:3.30.3-2~deb10u1]
Remv gnome-color-manager [3.30.0-2]
Remv colord [1.4.3-4]
Remv network-manager-gnome [1.8.20-1.1]
Remv dbus-user-session [1.12.20-0+deb10u1]
Remv gdm3 [3.30.2-3]
Remv gnome-disk-utility [3.30.2-3]
Remv gnome-music [3.30.2-1]
Remv gnome-session [3.30.1-2]
Remv gnome-tweaks [3.30.2-1]
Remv gnome-shell-extensions [3.30.1-1]
Remv gnome-settings-daemon [3.30.2-3] [gnome-shell:amd64 ]
Remv gnome-shell [3.30.2-11~deb10u2]
Remv gnome-software [3.30.6-5]
Remv gnome-sushi [3.30.0-2]
Remv gstreamer1.0-packagekit [1.1.12-5]
Remv gvfs-backends [1.38.1-5]
Remv nautilus [3.30.5-2]
Remv gvfs [1.38.1-5] [gvfs-fuse:amd64 nautilus-extension-brasero:amd64 ]
Remv gvfs-daemons [1.38.1-5] [gvfs-fuse:amd64 nautilus-extension-brasero:amd64 ]
Remv gvfs-fuse [1.38.1-5] [nautilus-extension-brasero:amd64 ]
Remv udisks2 [2.8.1-4] [nautilus-extension-brasero:amd64 ]
Remv rtkit [0.11-6] [nautilus-extension-brasero:amd64 ]
Remv policykit-1 [0.105-25] [network-manager:amd64 packagekit:amd64 nautilus-extension-brasero:amd64 ]
Remv libpam-systemd [241-7~deb10u4] [network-manager:amd64 packagekit:amd64 nautilus-extension-brasero:amd64 ]
Remv nautilus-extension-brasero [3.12.2-5] [network-manager:amd64 packagekit:amd64 ]
Remv network-manager [1.14.6-2+deb10u1] [packagekit:amd64 ]
Remv packagekit-tools [1.1.12-5] [packagekit:amd64 ]
Remv packagekit [1.1.12-5]

答案1

如果您只是想使用该git工具,则无需安装git-all。您可以通过运行apt-cache show git和查看软件包的描述apt-cache show git-all以及它们安装的软件包,阅读它们链接到的材料,然后做出决定。

该包git-all建议选择git-daemon-rungit-daemon-sysvinit,但由于某种原因apt自动选择:git-daemon-run

$ apt depends git-all
git-all
  Залежності (Depends): git (>> 1:2.20.1)
  Залежності (Depends): git (<< 1:2.20.1-.)
  Залежності (Depends): git-doc
  Залежності (Depends): git-el
  Залежності (Depends): git-cvs
  Залежності (Depends): git-mediawiki
  Залежності (Depends): git-svn
  Залежності (Depends): git-email
  Залежності (Depends): git-gui
  Залежності (Depends): gitk
  Залежності (Depends): gitweb
 |Рекомендує (Recommends): git-daemon-run
  Рекомендує (Recommends): git-daemon-sysvinit

根据包描述,您可以查找apt show git-daemon-run(强调我的):

git-daemon,由 git 包提供,是一个简单的 git 存储库服务器,非常适合只读更新,即通过网络从 git 存储库拉取。该软件包提供了用于永久运行 git-daemon 的 runit 服务。 这种配置比 git-daemon-sysvinit 更简单、更可靠,但代价是习惯了 sysvinit 的管理员不太熟悉。

git-daemon-run取决于runit,建议选择runit-sysvrunit-init、 或runit-systemd。出于某种原因而apt选择。依赖于取决于。这与Debian 上已默认安装的冲突:runit-sysvrunit-sysvsysvinit-corerunit-initsystemd-sysv

$ apt depends sysvinit-core runit-init --installed
sysvinit-core
  Залежності (Depends): debianutils (>= 4)
  Залежності (Depends): sysvinit-utils (>= 2.86.ds1-66)
 |Залежності (Depends): debconf (>= 0.5)
    cdebconf
    debconf
  Залежності (Depends): libc6 (>= 2.15)
  Залежності (Depends): libselinux1 (>= 1.32)
  Залежності (Depends): libsepol1 (>= 2.4)
  Конфлікти (Conflicts): systemd-sysv
  Заміняє (Replaces): systemd-sysv
runit-init
  Залежності (Depends): libc6 (>= 2.4)
  Конфлікти (Conflicts): systemd-sysv
  Заміняє (Replaces): systemd-sysv

因此,要解决您的问题,您必须在安装时指示apt保留:systemd-sysvgit-all

$ sudo apt-get install git-all systemd-sysv

这次apt会选择runit-systemd并且不应该删除任何包。

答案2

git-all建议git-daemon-run,这取决于runit,这与 systemd 冲突,或者更确切地说systemd-sysv。这最终导致与 GNOME 发生冲突,并apt选择删除冲突的包。

为了避免这种情况,有两种解决方案:

  • git-all不使用推荐的软件包进行安装:

    sudo apt install --no-install-recommends git-all
    
  • 避免安装git-all,只安装您需要的软件包:

    sudo apt install git
    

相关内容