在 Ubuntu 18.04.1 中安装 pandoc 2.3.1 的问题

在 Ubuntu 18.04.1 中安装 pandoc 2.3.1 的问题

我正在尝试在我的 Ubuntu 18.04.1 LTS 中安装 pandoc 2.3.1。

首先,我删除所有旧的 pandoc 版本(我的情况是 pandoc 1.19.2.1)

manolo@manolo:~$ sudo apt-get remove  pandoc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'pandoc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.

manolo@manolo:~$ sudo apt-get remove --auto-remove pandoc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'pandoc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.

manolo@manolo:~$ sudo apt-get purge pandoc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'pandoc' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.

然后,我运行以下命令来检查 pandoc 版本,由于未安装 pandoc,因此应该给我一个空白结果。但是,我得到了以下结果:

manolo@manolo:~$ pandoc -v
pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Default user data directory: /home/atai/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

然后,我尝试安装最新版本的 pandoc:

manolo@manolo:~$ sudo dpkg -i /home/atai/Desktop/pandoc-2.3.1-1-amd64.deb
Selecting previously unselected package pandoc.
(Reading database ... 263668 files and directories currently installed.)
Preparing to unpack .../pandoc-2.3.1-1-amd64.deb ...
Unpacking pandoc (2.3.1-1) ...
Setting up pandoc (2.3.1-1) ...
Processing triggers for man-db (2.8.3-2) ...

虽然,当我检查 pandoc 版本时,我仍然安装有 1.19.2.1:

manolo@manolo:~$ pandoc -v
pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Default user data directory: /home/atai/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

我的猜测与 pandoc 的安装路径有关。

manolo@manolo:~$ whereis pandoc
pandoc: /usr/bin/pandoc /home/atai/anaconda3/bin/pandoc /usr/share/man/man1/pandoc.1.gz

manolo@manolo:~$ type pandoc
pandoc is hashed (/home/atai/anaconda3/bin/pandoc)

答案1

我遇到了同样的问题,更新所有 conda 包后问题得到解决:conda update --all

相关内容