如何防止如此多的额外安装和升级?而是只安装 apt-file 包及其依赖项......?
仅 apt-file 包需要所有额外的包和升级吗?
apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libhtml-template-perl libkadm5clnt-mit7 libkadm5srv-mit7 libdb4.7 libkdb5-4
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
apt apt-utils aptitude aptitude-common cpp-4.4 curl g++-4.4 gcc-4.4
gcc-4.4-base gcc-4.7-base krb5-locales krb5-multidev libacl1 libapt-inst1.5
libapt-pkg-perl libapt-pkg4.12 libattr1 libboost-iostreams1.49.0 libc-bin
libc-dev-bin libc6 libc6-dev libc6-i386 libclass-isa-perl
libconfig-file-perl libcurl3 libdb5.1 libdbd-mysql-perl libdbi-perl
libept1.4.12 libexpat1 libfont-freetype-perl libgcc1 libglib2.0-0 libgmp10
libgnutls26 libgomp1 libgssapi-krb5-2 libgssglue1 libgssrpc4 libk5crypto3
libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-3 libkrb5-dbg
libkrb5-dev libkrb5support0 liblist-moreutils-perl liblocale-gettext-perl
libmpfr4 libmysqlclient18 libp11-kit0 libpango1.0-0 libpcre3 libperl5.14
libregexp-assemble-perl librtmp0 libsmbclient libsnmp-base libsnmp15
libssh2-1 libssl1.0.0 libstdc++6 libstdc++6-4.4-dev libswitch-perl
libtalloc2 libtdb1 libtext-charwidth-perl libtext-iconv-perl libuuid-perl
libwbclient0 libxapian22 locales make mysql-client mysql-client-5.5
mysql-common perl perl-base perl-modules python python-apt python-minimal
python-support python-xapian python2.7 python2.7-minimal samba samba-common
smbclient update-inetd winbind zlib1g
Suggested packages:
apt-doc debtags gcc-4.4-locales g++-4.4-multilib gcc-4.4-doc
libstdc++6-4.4-dbg gcc-4.4-multilib libmudflap0-4.4-dev libgcc1-dbg
libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 krb5-doc
glibc-doc krb5-user ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp
ttf-arphic-gkai00mp ttf-arphic-bkai00mp snmp-mibs-downloader
libstdc++6-4.4-doc xapian-tools make-doc libterm-readkey-perl perl-doc
libterm-readline-gnu-perl libterm-readline-perl-perl libpod-plainer-perl
python-doc python-tk python-apt-dbg python-gtk2 python-vte python-apt-doc
xapian-doc python2.7-doc binfmt-support smbldap-tools ldb-tools ctdb
Recommended packages:
aptitude-doc-en aptitude-doc libparse-debianchangelog-perl manpages-dev
libglib2.0-data tdb-tools libpam-winbind libnss-winbind
The following packages will be REMOVED:
defoma gcc-4.3 libbind9-40 libdns45 libept1 libisccfg40 libkrb53
libpango1.0-common libperl5.10 mysql-client-5.1 mysql-server-5.1
mysql-server-core-5.1
The following NEW packages will be installed:
apt-file aptitude-common curl gcc-4.7-base krb5-locales libapt-inst1.5
libapt-pkg-perl libapt-pkg4.12 libboost-iostreams1.49.0 libclass-isa-perl
libconfig-file-perl libcurl3 libdb5.1 libept1.4.12 libgmp10
libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 liblist-moreutils-perl
libmysqlclient18 libp11-kit0 libperl5.14 libregexp-assemble-perl librtmp0
libssh2-1 libssl1.0.0 libswitch-perl mysql-client-5.5 python2.7
python2.7-minimal
The following packages will be upgraded:
apt apt-utils aptitude cpp-4.4 g++-4.4 gcc-4.4 gcc-4.4-base krb5-multidev
libacl1 libattr1 libc-bin libc-dev-bin libc6 libc6-dev libc6-i386
libdbd-mysql-perl libdbi-perl libexpat1 libfont-freetype-perl libgcc1
libglib2.0-0 libgnutls26 libgomp1 libgssapi-krb5-2 libgssglue1 libgssrpc4
libk5crypto3 libkrb5-3 libkrb5-dbg libkrb5-dev libkrb5support0
liblocale-gettext-perl libmpfr4 libpango1.0-0 libpcre3 libsmbclient
libsnmp-base libsnmp15 libstdc++6 libstdc++6-4.4-dev libtalloc2 libtdb1
libtext-charwidth-perl libtext-iconv-perl libuuid-perl libwbclient0
libxapian22 locales make mysql-client mysql-common perl perl-base
perl-modules python python-apt python-minimal python-support python-xapian
samba samba-common smbclient update-inetd winbind zlib1g
65 upgraded, 30 newly installed, 12 to remove and 465 not upgraded.
Need to get 89.4 MB of archives.
After this operation, 2,526 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
答案1
瞧,当你运行服务器时,你应该只拥有运行你的东西所需的软件包。其他一切都是垃圾。你应该只拥有来自受信任来源的存储库,这些存储库提供支持的软件包。所有额外的东西都是不必要的。我给你的建议是:
- 清理服务器中不需要的东西
- 清理你的 apt 源列表中不需要的东西
- 执行
sudo apt-get update
,sudo apt-get upgrade && apt-get dist-ugprade
不要跳过升级(当然,建议您查看更改日志,查看更新解决了哪些漏洞/错误,以及是否可以利用某些软件包的新有用设置)
这样做,您就不需要安装那么多“附加”包(其中大多数是依赖项)(我看到很多库,您应该更频繁地更新您的服务器)。