Ubuntu命令行note工具使用起来很简洁方便,安装后启动有时会报错.
使用人少,修复简单却未能查到资料,特此记录修复方法.
系统环境
1
2
3
4
5
6
|
$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
|
安装命令
1
|
sudo apt-get install note
|
报错及修复
启动报错信息
1
2
3
|
$ note
Can't locate YAML.pm in @INC (you may need to install the YAML module) (@INC contains: /usr/bin/.. blib/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/note line 40.
BEGIN failed--compilation aborted at /usr/bin/note line 40.
|
修复方法
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
26
27
|
$ sudo apt-get install libyaml-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libyaml-libyaml-perl
Suggested packages:
libyaml-shell-perl
The following NEW packages will be installed:
libyaml-libyaml-perl libyaml-perl
0 upgraded, 2 newly installed, 0 to remove and 34 not upgraded.
Need to get 86.6 kB of archives.
After this operation, 272 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.aliyun.com/ubuntu focal/main amd64 libyaml-libyaml-perl amd64 0.81+repack-1 [28.5 kB]
Get:2 http://mirrors.aliyun.com/ubuntu focal/main amd64 libyaml-perl all 1.30-1 [58.2 kB]
Fetched 86.6 kB in 0s (224 kB/s)
Selecting previously unselected package libyaml-libyaml-perl.
(Reading database ... 123869 files and directories currently installed.)
Preparing to unpack .../libyaml-libyaml-perl_0.81+repack-1_amd64.deb ...
Unpacking libyaml-libyaml-perl (0.81+repack-1) ...
Selecting previously unselected package libyaml-perl.
Preparing to unpack .../libyaml-perl_1.30-1_all.deb ...
Unpacking libyaml-perl (1.30-1) ...
Setting up libyaml-libyaml-perl (0.81+repack-1) ...
Setting up libyaml-perl (1.30-1) ...
Processing triggers for man-db (2.9.1-1) ...
|
数据备份/导出/导入
数据备份
1
|
cp $HOME/.notedb /backup/.notedb
|
数据导出
1
|
note -D /backup/backup.txt
|
数据导入(默认为追加,可直接在有note数据的时候直接导入其他数据)
1
|
note -I /backup/backup.txt
|