小编par*_*y72的帖子

“apt-get -f install”失败,“/usr/bin/dpkg 返回错误代码 (1)”

可能的重复:
修复损坏的包

我开始尝试安装 CVS:

$ sudo apt-get install cvs
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:
 libcups2 : Breaks: libcups2:i386 (!= 1.5.3-0ubuntu3) but 1.5.3-0ubuntu4 is to be installed
 libcups2:i386 : Breaks: libcups2 (!= 1.5.3-0ubuntu4) but 1.5.3-0ubuntu3 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Run Code Online (Sandbox Code Playgroud)

但是当我尝试这个时,我得到:

$ sudo apt-get -f …
Run Code Online (Sandbox Code Playgroud)

package-management apt

4
推荐指数
1
解决办法
3万
查看次数

我如何使用 pip3?

如果我尝试使用,pip3我会看到:

$ pip3 --version

Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip
Run Code Online (Sandbox Code Playgroud)

所以我运行:

$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (9.0.1-2.3~ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Run Code Online (Sandbox Code Playgroud)

然后:

$ pip3 --version

Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip
Run Code Online (Sandbox Code Playgroud)

说明是错误的吗?

python3 pip 18.04

2
推荐指数
1
解决办法
9390
查看次数

IF bash 语句中有哪些不同的选项(-f、-d、-n)?

我正在查看主目录中的“.profile”文件,我看到该IF语句使用了不同的选项:

if [ -n "$BASH_VERSION" ]; then...
...
if [ -f "$HOME/.bashrc" ]; then...
...
if [ -d "$HOME/bin" ] ; then...
...
Run Code Online (Sandbox Code Playgroud)

这里以及其他 bash 脚本中的-n -f和选项的含义和用途是什么?-d

command-line bash scripts

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

18.04 ×1

apt ×1

bash ×1

command-line ×1

package-management ×1

pip ×1

python3 ×1

scripts ×1