PDFInfoNotInstalledError:无法获取页数。 poppler 是否已安装并位于 PATH 中?

PDFInfoNotInstalledError:无法获取页数。 poppler 是否已安装并位于 PATH 中?

目前我正在尝试使用 pdfinfo 来提取 pdf 文件中的内容。

我已经在本地使用安装了 poppler-utils

!sudo apt-get install -y poppler-utils

它起作用了,现在我在 Databricks jupyter 笔记本中运行相同的代码,因为这个命令运行得很好,当我检查时which pdfinfo它给了我一条路径。

之后,当我运行该命令时,它不会安装并给出错误。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libpoppler118 poppler-data
Suggested packages:
  ghostscript fonts-japanese-mincho | fonts-ipafont-mincho
  fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai
  fonts-arphic-uming fonts-nanum
The following NEW packages will be installed:
  libpoppler118 poppler-data poppler-utils
0 upgraded, 3 newly installed, 0 to remove and 40 not upgraded.
Need to get 1,263 kB/3,434 kB of archives.
After this operation, 17.7 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpoppler118 amd64 22.02.0-2ubuntu0.1
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 poppler-utils amd64 22.02.0-2ubuntu0.1
Err:1 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 libpoppler118 amd64 22.02.0-2ubuntu0.1
  404  Not Found [IP: 91.189.91.83 80]
Err:2 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 poppler-utils amd64 22.02.0-2ubuntu0.1
  404  Not Found [IP: 91.189.91.83 80]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package poppler-data.
(Reading database ... 98324 files and directories currently installed.)
Preparing to unpack .../poppler-data_0.4.11-1_all.deb ...
Unpacking poppler-data (0.4.11-1) ...
Setting up poppler-data (0.4.11-1) ...
Processing triggers for fontconfig (2.13.1-4.2ubuntu5) ...
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/poppler/libpoppler118_22.02.0-2ubuntu0.1_amd64.deb  404  Not Found [IP: 91.189.91.83 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/poppler/poppler-utils_22.02.0-2ubuntu0.1_amd64.deb  404  Not Found [IP: 91.189.91.83 80]

我尝试了多种方法但情况相同。

!apt install poppler-utils -y
!sudo apt-get install -y poppler-utils
!sudo apt-get install -y poppler-utils --fix-missing 

谁能帮我这个?!

相关内容