有个破机器,cpu,内存都破,显卡都没,兴致勃勃装了个Ubuntu server LTS 12.04,准备搭建个公用的ftp服务器,也省得安装杀毒软件,结果问题一堆.

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

等各种错误爆出来,满世界google,看到老外说搭了个PPA源,使用Ubuntu的添加PPA命令

sudo apt-get install python-software-properties

结果却提示
sudo: add-apt-repository: command not found

解决方法:

1
2
3
4
5
zzz@ftp:/etc/vsftpd$ add-apt-repository

The program 'add-apt-repository' is currently not installed. You can install it by typing:

sudo apt-get install python-software-properties

当出现某个命令未发现时,多半是没有安装软件包,此时只需要直接输入命令,Ubuntu就会提示安装方法,如有依赖关系也将一并在此安装,接下来就复制粘贴安装就可以了.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
zzz@ftp:/etc/vsftpd$ sudo apt-get install python-software-properties
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-pycurl
Suggested packages:
python-pycurl-dbg
The following NEW packages will be installed:
python-pycurl python-software-properties
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 71.4 kB of archives.
After this operation, 416 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://cn.archive.Ubuntu.com/Ubuntu/ precise/main python-pycurl amd64 7.19.0-4Ubuntu3 [49.2 kB]
Get:2 http://cn.archive.Ubuntu.com/Ubuntu/ precise-updates/main python-software-properties all 0.82.7.3 [22.3 kB]
Fetched 71.4 kB in 0s (204 kB/s)
Selecting previously unselected package python-pycurl.
(Reading database ... 60895 files and directories currently installed.)
Unpacking python-pycurl (from .../python-pycurl_7.19.0-4Ubuntu3_amd64.deb) ...
Selecting previously unselected package python-software-properties.
Unpacking python-software-properties (from .../python-software-properties_0.82.7.3_all.deb) ...
Processing triggers for man-db ...
Setting up python-pycurl (7.19.0-4Ubuntu3) ...
Setting up python-software-properties (0.82.7.3) ...