ubuntu安装包命令

1.介绍

# 查看安装的所有软件【带简介】
# dpkg -l|grep ifupdown
iH  ifupdown                            0.8.10ubuntu1.2                            amd64        high level tools to configure network interfaces

#使用apt查看已安装版本
# apt list --installed|grep ifupdown
ifupdown/now 0.8.10ubuntu1.2 amd64 [installed,upgradable to: 0.8.10ubuntu1.4]

#直接查包名也ok
# dpkg -l ifupdown
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                       Version            Architecture       Description
+++-==========================-==================-==================-==========================================================
iH  ifupdown                   0.8.10ubuntu1.2    amd64              high level tools to configure network interfaces

 安装包:

# sudo apt-get install ccache

但安装ccache有以下问题,搜到的解决方案不太敢尝试,怕把编译器搞崩了,暂存一下问题。

~$ sudo apt-get install ccache
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 ifenslave : Depends: ifupdown (>= 0.7.46)
 liblxc1 : Depends: cgroup-lite but it is not going to be installed or
                    systemd
 libpam-systemd : Depends: systemd (= 229-4ubuntu21.31)
 resolvconf : Depends: ifupdown
 snapd : Depends: systemd
 systemd-sysv : PreDepends: systemd
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

~$ sudo apt-get -f install
Do you want to continue? [Y/n] y
(Reading database ... 117534 files and directories currently installed.)
Preparing to unpack .../ifupdown_0.8.10ubuntu1.4_amd64.deb ...
Unpacking ifupdown (0.8.10ubuntu1.4) over (0.8.10ubuntu1.2) ...
dpkg: error processing archive /var/cache/apt/archives/ifupdown_0.8.10ubuntu1.4_amd64.deb (--unpack):
 unable to securely remove '/sbin/ifup.dpkg-new': Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../systemd_229-4ubuntu21.31_amd64.deb ...
Unpacking systemd (229-4ubuntu21.31) over (229-4ubuntu21.1) ...
dpkg: error processing archive /var/cache/apt/archives/systemd_229-4ubuntu21.31_amd64.deb (--unpack):
 unable to securely remove '/usr/bin/systemd-stdio-bridge.dpkg-new': Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for dbus (1.10.6-1ubuntu3.3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 /var/cache/apt/archives/ifupdown_0.8.10ubuntu1.4_amd64.deb
 /var/cache/apt/archives/systemd_229-4ubuntu21.31_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

posted @ 2024-04-14 19:32  lypbendlf  阅读(5)  评论(0编辑  收藏  举报