我想安装libatk-bridge2.0
,所以我跑了sudo apt-get install libatk-bridge2.0
:
$ sudo apt-get install libatk-bridge2.0
[sudo] password for christoph:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
libatk-bridge2.0-0 is already the newest version (2.18.1-2ubuntu1).
The following additional packages will be installed:
libatspi2.0-dev libdbus-1-dev libxtst-dev x11proto-record-dev
The following NEW packages will be installed:
libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev
x11proto-record-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 274 kB of archives.
After this operation, 1,804 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libdbus-1-dev amd64 1.10.6-1ubuntu3 [161 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-record-dev all 1.14.2-1 [33.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxtst-dev amd64 2:1.2.2-1 [17.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libatspi2.0-dev amd64 2.18.3-4ubuntu1 [59.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 libatk-bridge2.0-dev amd64 2.18.1-2ubuntu1 [2,824 B]
Fetched 274 kB in 0s (340 kB/s)
Selecting previously unselected package libdbus-1-dev:amd64.
(Reading database ... 336246 files and directories currently installed.)
Preparing to unpack .../libdbus-1-dev_1.10.6-1ubuntu3_amd64.deb ...
Unpacking libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Selecting previously unselected package x11proto-record-dev.
Preparing to unpack .../x11proto-record-dev_1.14.2-1_all.deb ...
Unpacking x11proto-record-dev (1.14.2-1) ...
Selecting previously unselected package libxtst-dev:amd64.
Preparing to unpack .../libxtst-dev_2%3a1.2.2-1_amd64.deb ...
Unpacking libxtst-dev:amd64 (2:1.2.2-1) ...
Selecting previously unselected package libatspi2.0-dev.
Preparing to unpack .../libatspi2.0-dev_2.18.3-4ubuntu1_amd64.deb ...
Unpacking libatspi2.0-dev (2.18.3-4ubuntu1) ...
Selecting previously unselected package libatk-bridge2.0-dev:amd64.
Preparing to unpack .../libatk-bridge2.0-dev_2.18.1-2ubuntu1_amd64.deb ...
Unpacking libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Setting up x11proto-record-dev (1.14.2-1) ...
Setting up libxtst-dev:amd64 (2:1.2.2-1) ...
Setting up libatspi2.0-dev (2.18.3-4ubuntu1) ...
Setting up libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...
libatk-bridge2
当我几分钟后发现我不需要时,我真的才注意到有些问题,所以我想清除它。
$ sudo apt-get purge libatk-bridge2.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
The following packages were automatically installed and are no longer required:
accountsservice-ubuntu-schemas adium-theme-ubuntu appstream apt-xapian-index
apturl-common dbus-property-service dleyna-server fonts-droid-fallback
fonts-noto-mono gdebi-core gedit-common gir1.2-atspi-2.0 gir1.2-gmenu-3.0
gir1.2-secret-1 gir1.2-udisks-2.0 gksu gnome-control-center-data
gnome-software-common gnome-video-effects gtk2-engines-murrine
guile-2.0-libs iio-sensor-proxy indicator-network intel-gpu-tools
latexila-data liba11y-profile-manager-0.1-0 libandroid-properties1
libappindicator1 libappstream3 libatspi2.0-dev libboost-log1.58.0
libboost-regex1.58.0 libboost-thread1.58.0 libconnectivity-qt1
libcontent-hub0 libdbus-1-dev libdbus-cpp5 libdleyna-connector-dbus-1.0-1
libdleyna-core-1.0-3 libdmapsharing-3.0-2 libept1.5.0 libevent-2.0-5
libfreerdp-plugins-standard libgexiv2-2 libgflags2v5 libgksu2-0
libgoogle-glog0v5 libgpod-common libgpod4 libgssdp-1.0-3 libgupnp-1.0-4
libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libhardware2 libhybris
libhybris-common1 libhybris-utils libindicator7 liblibertine1
liblttng-ust-ctl2 liblttng-ust0 libmedia1 libminiupnpc10 libnatpmp1
libonline-accounts-client1 libonline-accounts-daemon1 libonline-accounts-qt1
liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libprocess-cpp3
libqmenumodel0 libqofono-qt5-0 libqqwing2v5 libqt5multimediaquick-p5
libqt5positioning5 libqt5systeminfo5 libqt5xmlpatterns5 libsgutils2-2
libssh-4 libsystemsettings1 libtrust-store2 libubuntu-app-launch2
libubuntu-download-manager-client1 libubuntu-download-manager-common1
libudm-common1 libunwind8 liburcu4 libwhoopsie-preferences0 libxapian-1.3-5
libxtst-dev network-manager-openvpn ofono oneconf-common oxideqt-codecs
python-aptdaemon python-attr python-cups python-dbus python-debian
python-debtagshw python-defer python-dirspec python-gpgme python-oneconf
python-pam python-piston-mini-client python-pyasn1-modules python-serial
python-service-identity python-twisted-bin python-twisted-core
python-twisted-web python-xapian python-zope.interface python3-brlapi
python3-gi-cairo python3-gnupg python3-louis python3-mako python3-oneconf
python3-piston-mini-client python3-speechd python3-xapian1.3 qmenumodel-qml
qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
qml-module-qtmultimedia qml-module-qtsysteminfo
qml-module-ubuntu-connectivity qml-module-ubuntu-onlineaccounts
qml-module-ubuntu-onlineaccounts2 qml-module-ubuntu-web
qtdeclarative5-accounts-plugin qtdeclarative5-gsettings1.0
qtdeclarative5-ofono0.2 qtdeclarative5-qtquick2-plugin
qtdeclarative5-ubuntu-content1 qtdeclarative5-ubuntu-settings-components
realmd remmina-common rhythmbox-data shotwell-common
software-center-aptdaemon-plugins sqlite3 syslinux syslinux-common
syslinux-legacy system-image-common system-image-dbus texlive
transmission-common ubuntu-keyboard-data ubuntu-wallpapers
ubuntu-wallpapers-xenial ubuntuone-client-data ubuntuone-credentials-common
unity-webapps-qml urfkill usb-creator-common webapp-container webbrowser-app
whoopsie-preferences x11proto-record-dev xbrlapi
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0 pinentry-curses
python3-apparmor python3-apparmor-click python3-click-package
python3-libapparmor
Suggested packages:
click-reviewers-tools ubuntu-app-launch-tools | upstart-app-launch-tools
pinentry-doc
The following packages will be REMOVED:
a11y-profile-manager-indicator* account-plugin-facebook*
account-plugin-flickr* account-plugin-google* activity-log-manager*
adwaita-icon-theme* aisleriot* apport-gtk* apturl* bamfdaemon* baobab*
cheese* compiz* compiz-gnome* dconf-editor* deja-dup* eog* evince*
evolution* evolution-data-server* evolution-plugins* file-roller* firefox*
gcr* gdebi* gedit* ghex* gir1.2-appindicator3-0.1* gir1.2-gtk-3.0*
gir1.2-gtksource-3.0* gir1.2-keybinder-3.0* gir1.2-peas-1.0* gir1.2-rb-3.0*
gir1.2-totem-1.0* gir1.2-vte-2.91* gir1.2-webkit2-4.0* gir1.2-wnck-3.0*
gkbd-capplet* gnome-bluetooth* gnome-calculator* gnome-calendar*
gnome-disk-utility* gnome-font-viewer* gnome-icon-theme* gnome-keyring*
gnome-mahjongg* gnome-mines* gnome-orca* gnome-power-manager*
gnome-screensaver* gnome-screenshot* gnome-search-tool* gnome-session-bin*
gnome-session-canberra* gnome-software* gnome-sudoku* gnome-system-log*
gnome-system-monitor* gnome-terminal* gnome-user-guide* gnome-user-share*
gstreamer1.0-clutter-3.0* gucharmap* gvfs-backends* humanity-icon-theme*
ibus* ibus-gtk3* ibus-table* indicator-application* indicator-appmenu*
indicator-bluetooth* indicator-keyboard* indicator-printers* kazam*
language-selector-gnome* latexila* libaccount-plugin-1.0-0*
libaccount-plugin-generic-oauth* libaccount-plugin-google*
libappindicator3-1* libatk-adaptor* libatk-bridge2.0-0*
libatk-bridge2.0-dev* libavahi-ui-gtk3-0* libcanberra-gtk3-0*
libcanberra-gtk3-module* libchamplain-0.12-0* libchamplain-gtk-0.12-0*
libcheese-gtk25* libcheese8* libclutter-1.0-0* libclutter-gst-3.0-0*
libclutter-gtk-1.0-0* libcryptui0a* libedataserverui-1.2-1*
libevdocument3-4* libevolution* libevview3-3* libgail-3-0* libgcr-ui-3-1*
libgnome-bluetooth13* libgnome-desktop-3-12* libgnomekbd8* libgtk-3-0*
libgtk-3-bin* libgtk-3-common* libgtkhex-3-0* libgtkmm-3.0-1v5*
libgtksourceview-3.0-1* libgtkspell3-3-0* libgucharmap-2-90-7*
libgweather-3-6* libido3-0.1-0* libindicator3-7* libkeybinder-3.0-0*
libmetacity-private3a* libnautilus-extension1a* libnm-gtk0* libnma0*
libpeas-1.0-0* libpeas-1.0-0-python3loader*
libreoffice-avmedia-backend-gstreamer* librhythmbox-core9* libtimezonemap1*
libtotem0* libunity-control-center1* libunity-core-6.0-9*
libunity-gtk3-parser0* libunity-misc4* libunity-settings-daemon1*
libunity-webapps0* libvte-2.91-0* libwebkit2gtk-4.0-37*
libwebkit2gtk-4.0-37-gtk2* libwebkitgtk-3.0-0* libwnck-3-0* libyelp0*
light-themes* meld* mousetweaks* nautilus* nautilus-dropbox*
nautilus-megasync* nautilus-sendto* nautilus-share* network-manager-gnome*
network-manager-pptp-gnome* notify-osd* onboard* onboard-data* oneconf*
pinentry-gnome3* policykit-1-gnome* python-aptdaemon.gtk3widgets*
python-ubuntu-sso-client* python3-aptdaemon.gtk3widgets* python3-pyatspi*
remmina* remmina-plugin-rdp* remmina-plugin-vnc* rhythmbox*
rhythmbox-plugin-zeitgeist* rhythmbox-plugins* seahorse* seahorse-daemon*
session-shortcuts* sessioninstaller* shotwell* simple-scan* software-center*
software-properties-gtk* system-config-printer-gnome* totem* totem-plugins*
transmission-gtk* ubuntu-artwork* ubuntu-desktop* ubuntu-docs* ubuntu-mono*
ubuntu-release-upgrader-gtk* ubuntu-session* ubuntu-software*
ubuntu-sso-client* unity* unity-asset-pool* unity-control-center*
unity-control-center-signon* unity-greeter* unity-gtk3-module*
unity-scope-calculator* unity-scope-gdrive* unity-scope-manpages*
unity-services* unity-settings-daemon* unity-tweak-tool*
unity-webapps-common* unity-webapps-service* update-manager*
update-notifier* usb-creator-gtk* vino* xdg-user-dirs-gtk* xdiagnose* yelp*
zeitgeist-datahub* zenity*
The following NEW packages will be installed:
apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0 pinentry-curses
python3-apparmor python3-apparmor-click python3-click-package
python3-libapparmor
0 upgraded, 12 newly installed, 206 to remove and 0 not upgraded.
Need to get 350 kB of archives.
After this operation, 592 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
正如你所看到的,它打算删除很多东西。 install 命令和 purge 命令都说明了有关正则表达式的内容。但是正则libatk-bridge2.0
表达式如何呢?当然,foo
这是一个仅匹配的正则表达式foo
,但如果libatk-bridge2.0
只有一个匹配的字符串libatk-bridge2.0
,则 apt-get 不应选择libatk-bridge2.0-0
它。
当然,如果您仍然有输出,则很容易清除已安装的确切软件包...
$ sudo apt-get purge libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev x11proto-record-dev
[sudo] password for christoph:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libatk-bridge2.0-dev* libatspi2.0-dev* libdbus-1-dev* libxtst-dev*
x11proto-record-dev*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 1,804 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 336354 files and directories currently installed.)
Removing libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...
Removing libatspi2.0-dev (2.18.3-4ubuntu1) ...
Removing libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Removing libxtst-dev:amd64 (2:1.2.2-1) ...
Removing x11proto-record-dev (1.14.2-1) ...
Processing triggers for man-db (2.7.5-1) ...
......但是为什么会发生这种情况呢?
答案1
长话短说实际的包名称是libatk-bridge2.0-0
因此libatk-bridge2.0
匹配:(libatk-bridge2.0-0
几乎总是存在)和libatk-bridge2.0-dev
.
您没有安装,libatk-bridge2.0
而是安装了其他东西:
Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
libatk-bridge2.0-0 is already the newest version (2.18.1-2ubuntu1).
The following additional packages will be installed:
libatspi2.0-dev libdbus-1-dev libxtst-dev x11proto-record-dev
The following NEW packages will be installed:
libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev
x11proto-record-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
并且libatk-bridge2.0
确实匹配了它们,因为实际的包名称是libatk-bridge2.0-0
。
然后,您再次purge
使用libatk-bridge2.0
并确实匹配libatk-bridge2.0-0
被删除。挑衅:
The following packages will be REMOVED:
***A LOT OF STUFF**
这删除了很多东西,因为 ATK(及其 DBUS 桥)接近 GNOME 依赖关系树的底部。因此,几乎所有依赖于 GNOME 环境和 GTK 的内容都被标记为清除。
apt-get
当找不到确切的包名称时,会执行正则表达式匹配。来自man apt-get
(install
命令部分):
If no package matches the given expression and the expression
contains one of '.', '?' or '*' then it is assumed to be a POSIX
regular expression, and it is applied to all package names in the
database. Any matches are then installed (or removed). Note that
matching is done by substring so 'lo.*' matches 'how-lo' and
'lowest'. If this is undesired, anchor the regular expression with
a '^' or '$' character, or create a more specific regular
expression.
所以是的,libatk-bridge2.0
有一个点( ),因此在我们看来.
它作为正则表达式已经足够好了。apt-get
答案2
当您搜索的内容包含在您正在搜索的内容中时,正则表达式通配符将为 true。由于它尝试卸载的两个包的名称中包含您输入的单词,因此它返回 true。您可以尝试为开始和结束字符串添加正则表达式分隔符,但除此之外, apt-get remove 是否有效?您可以删除其中包含依赖项的配置文件。