笨办法学Linux练习7 Err 404
刚输入第一条命令sudo aptitude install pv
,Shell就给我报错了。错误信息如下:
1 | Err http://debian.lcs.mit.edu/debian/ squeeze/main pv amd64 1.1.4-1 404 NOT Found |
大概的意思是网络无法连接?输入cat /etc/issue
看看系统版本。原来教程上用的Linux虚拟机镜像是超古老的Debian 6,都这么老的东西,源都坏了吧……看来要手动给Debian 6换个源。操作步骤如下:
修改源文件,删除旧的源,添加新的源
1
2
3sudo vim /etc/apt/sources.list # 打开sources.list后,删掉文件里所有内容,加上下面两行
deb http://archive.debian.org/debian squeeze main
deb http://archive.debian.org/debian squeeze-lts main以某种方式连入国际互联网
更新软件包信息库
1
sudo aptitude update
再次输入
sudo aptitude install pv
,接着Debian会问你Do you want to ignore this warning and proceed anyway?
,你输入yes
。若pv
安装成功,你会看见:1
2
3
4
5
6
7
8
9
10user1@vm1:~$ sudo aptitude install pv
The following NEW packages will be installed:
pv
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/28.9 kB of archives. After unpacking 143 kB will be used.
Selecting previously deselected package pv.
(Reading database ... 39657 files and directories currently installed.)
Unpacking pv (from .../archives/pv_1.1.4-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up pv (1.1.4-1) ...