0%

自从把这个主页对应的 repo 设置为 private,链接也就没法访问了,但是今天又心血来潮重新设置为 public,但是,并没有一键恢复,还是有些东西需要设置的,另外如何新增博客之前没记录,也忘得差不多了,因此呢,索性新建一个,作为博客重启的记录吧。

Read more »

最近打开 Cmder 总是会有弹窗提示没有安装 7zip 或者 winRar,它默认取得路径是 %ProgramFiles%\7-Zip\7zg.exe,这个看到没有啊,弱智吧

怎么修复呢?

Win+Alt+P 打开设置,切到 General - Update,看下图:

很明显路径不对,由于用 scoop 装过 7zip,将路径改一下好了:"%SCOOP%/apps/7zip/current/7zg.exe" x -y "%1"

今天在 24 上装软件遇到这个问题,经过搜索,解决这个问题:

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
taseikyo@node ~> sai gcc make libncurses5-dev openssl libssl-dev 
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.7.5-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python3 (3.7.5-1) ...
running python rtupdate hooks for python3.7...
dpkg-query: package 'rhythmbox-plugin-alternative-toolbar' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugin-alternative-toolbar
error running python rtupdate hook rhythmbox-plugin-alternative-toolbar
dpkg-query: package 'rhythmbox-plugins' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugins
error running python rtupdate hook rhythmbox-plugins
dpkg-query: package 'sosreport' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of sosreport
error running python rtupdate hook sosreport
dpkg-query: package 'streamlink' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of streamlink
error running python rtupdate hook streamlink
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
Errors were encountered while processing:
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

with similar output all around due to having rtupdate hooks for packages that were not installed on the system in /usr/share/python3/runtime.d.

Fixed by removing the <missing-package-name>.rtupdate files in the directory above and reinstalling python3.

将错误信息中的 xxx.rtupdate 从 /usr/share/python3/runtime.d 目录删除,然后重装 Python3 然后就好了。

1
2
3
4
5
6
7
8
9
10
taseikyo@node ~> sai gcc make libncurses5-dev openssl libssl-dev 
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version (4:9.2.1-3.1ubuntu1).
libncurses5-dev is already the newest version (6.1+20190803-1ubuntu1).
libssl-dev is already the newest version (1.1.1c-1ubuntu4.1).
make is already the newest version (4.2.1-1.2).
openssl is already the newest version (1.1.1c-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

最近学到了 Linux 可以通过 /etc/hosts.allow/etc/hosts.deny 对远程访问进行控制。

How to allow an IP address for SSH connection?

  • Step 1 : SSH to server as root user.
  • Step 2 : Open /etc/hosts.allow file using your favorite text editor.

To allow one IP address to server:

1
sshd : IP-Address

To allow more than one IP addresses:

1
sshd : IP-Address1, IP-Address2, IP-Address3

To allow IP ranges:

1
2
sshd : 33.*.*.*
sshd : 66.66.*.*

To allow all IP addresses for SSH:

1
sshd : ALL

Or

1
ALL : ALL

We can also control the same from /etc/hosts.deny file by adding the keyword “ALLOW.” See the example pasted below:

Example:

1
2
3
# vim /etc/hosts.deny

sshd : ALL : ALLOW

今天在 node24 安装 streamlink 时安装不上,提示添加 –fix-missing 加上还是不行,想着是不是因为太久没更新的缘故试了下 update:

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
28
29
30
31
32
33
34
35
36
tian@node24 ~/D> sau
Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-security InRelease
Ign:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-proposed InRelease
Err:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan Release
404 Not Found [IP: 101.6.8.193 443]
Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-updates Release
404 Not Found [IP: 101.6.8.193 443]
Err:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-backports Release
404 Not Found [IP: 101.6.8.193 443]
Err:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-security Release
404 Not Found [IP: 101.6.8.193 443]
Err:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-proposed Release
404 Not Found [IP: 101.6.8.193 443]
Hit:11 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:13 http://dk.archive.ubuntu.com/ubuntu xenial InRelease
Ign:12 http://www.analizo.org/download ./ InRelease
Get:14 http://www.analizo.org/download ./ Release [2,740 B]
Reading package lists... Done
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu eoan-proposed Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

开始直接想着是源坏掉了于是换成了阿里源,结果还是不行,于是搜这个错误,搜到 CSDN 这个博客:https://blog.csdn.net/jh_luchi/article/details/102812031

按照他的方法果然解决了:

1.在官网源 https://mirrors.ustc.edu.cn/repogen/ 下载对应版本最新的源

虽然 19.10 提示说已经过期,但我还是直接复制粘贴到 /etc/apt/sources.list

1
2
3
4
5
6
7
8
9
10
11
deb https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ eoan-backports main restricted universe multiverse

编辑完保存,update 没报错,继续安装也是没问题,好耶!

其实在自己电脑上转化没什么问题,两三分钟就完事了,在实验室电脑一直有问题,之前就因为找不到问题去 GitHub 的 issue 页面留言过(相当多人遇到这个问题),今天再次升级,报了具体错,搜了一下解决了。

过程如下,在变更过程中报错:由于虚拟磁盘系统限制,无法完成请求的操作。虚拟硬盘文件必须是未压缩和未加密的文件,并且不能是稀疏文件。

1
2
3
4
5
6
7
8
9
10
tian :: ~ » wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 1
docker-desktop-data Stopped 2
docker-desktop Stopped 2
tian :: ~ » wsl --shutdown
tian :: ~ » wsl --set-version Ubuntu-20.04 2
正在进行转换,这可能需要几分钟时间...
有关与 WSL 2 的主要区别的信息,请访问 https://aka.ms/wsl2
由于虚拟磁盘系统限制,无法完成请求的操作。虚拟硬盘文件必须是未压缩和未加密的文件,并且不能是稀疏文件。

搜到一个 CSDN 博客,它主要将 SpringBoot 的坑,顺便提到这个错,结果真有效。

方法是将 Linux 安装目录(C:\Users\tian\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc)的 LocalState 文件夹的压缩节省空间去掉,注意这里不用选及其子目录,只用这一个目录即可。

1
2
3
4
tian :: ~ » wsl --set-version Ubuntu-20.04 2
正在进行转换,这可能需要几分钟时间...
有关与 WSL 2 的主要区别的信息,请访问 https://aka.ms/wsl2
转换完成。

今天用 vscode 写论文,有个表格,于是从给出的模板后面 copy 了表格的代码,稍作修改,然后 ctrl+s 开始 build,结果几分钟过去了一直卡在 build,于是我换了一个 build 的 recipe(侧边栏的 TEX 按钮 - COMMANDS - Build LaTex project),一共有 4 个,我挨个试了个遍都是一样的结果,我:?

我以为是 xelatex 这个程序出问题了,因为是之前安装 texlive2018,于是用 scoop 重新装了,结果依然会卡在 build。我就迷惑了,哪里出问题了,于是直接把文件代码贴到 overleaf 网站上,结果由于长时间编译不出来报错了,说是有语法错。。。我人傻了,vscode 咋没有报错?

表格代码如下,目前并不懂哪里出错了 :O

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Table~\ref{tab1} lists the comparison.

\begin{table}
\begin{tabular}{lll}
\caption{Comparison between A, B and C}
\label{tab1}
\toprule
Virtualization Technology&Pros&Cons\\
\midrule
As & Allows deploying different operating systems on a single host & For Swedish names\\
Bs & 1 in 5& Common in math\\
Cs & 4 in 5 & Used in business\\
\bottomrule
\end{tabular}
\end{table}