Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚩🇨🇳🏹红旗礼逆袭:安装电子书分合工具(PDFsam) #17

Closed
englianhu opened this issue Jan 15, 2023 · 3 comments
Closed

Comments

@englianhu englianhu changed the title 🚩🇨🇳🏹红旗礼逆袭:安装**电子书分合工具**(PDFsam) 🚩🇨🇳🏹红旗礼逆袭:安装电子书分合工具(PDFsam) Jan 15, 2023
@englianhu
Copy link
Contributor Author

$ wget https://github.com/torakiki/pdfsam/releases/download/v5.0.2/pdfsam_5.0.2-1_amd64.deb
$ sudo apt install -y ./*.deb && sudo rm -rf *.deb
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
注意,选中 'pdfsam-basic' 而非 './pdfsam_5.0.2-1_amd64.deb'
下列软件包是自动安装的并且现在不需要了:
  calibre-bin libboost-dev liblog4shib-dev libpodofo0.9.6 librust-schannel-dev librust-socket2-dev optipng python-apsw
  python-css-parser python-cssselect python-cssutils python-feedparser python-html5-parser python-mechanize
  python-msgpack python-netifaces python-pyqt5.qtsvg python-pyqt5.qtwebkit python-regex python-repoze.lru python-routes
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
  pdfsam-basic
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 0 B/71.9 MB 的归档。
解压缩后会消耗 98.9 MB 的额外空间。
获取:1 /home/englianhu/pdfsam_5.0.2-1_amd64.deb pdfsam-basic all 5.0.2-1 [71.9 MB]
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
正在选中未选择的软件包 pdfsam-basic。
(正在读取数据库 ... 系统当前共安装有 948121 个文件和目录。)
准备解压 .../pdfsam_5.0.2-1_amd64.deb  ...
正在解压 pdfsam-basic (5.0.2-1) ...
dpkg: 处理归档 /home/englianhu/pdfsam_5.0.2-1_amd64.deb (--unpack)时出错:
 正试图覆盖 /usr/bin/pdfsam,它同时被包含于软件包 pdfsam 4.0.1-1
在处理时有错误发生:
 /home/englianhu/pdfsam_5.0.2-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ 
$ ## 倘若系统早已安装旧版本,需要通过以下方式升级应用版本。
$ sudo dpkg -i ./*.deb
(正在读取数据库 ... 系统当前共安装有 948121 个文件和目录。)
准备解压 ./pdfsam_5.0.2-1_amd64.deb  ...
正在解压 pdfsam-basic (5.0.2-1) ...
dpkg: 处理归档 ./pdfsam_5.0.2-1_amd64.deb (--install)时出错:
 正试图覆盖 /usr/bin/pdfsam,它同时被包含于软件包 pdfsam 4.0.1-1
正在处理用于 desktop-file-utils (0.23-4) 的触发器 ...
正在处理用于 mime-support (3.62) 的触发器 ...
在处理时有错误发生:
 ./pdfsam_5.0.2-1_amd64.deb
$ 
$ sudo dpkg -i pdfsam_5.0.2-1_amd64.deb
(正在读取数据库 ... 系统当前共安装有 948229 个文件和目录。)
准备解压 pdfsam_5.0.2-1_amd64.deb  ...
正在解压 pdfsam-basic (5.0.2-1) ...
dpkg: 处理归档 pdfsam_5.0.2-1_amd64.deb (--install)时出错:
 正试图覆盖 /usr/bin/pdfsam,它同时被包含于软件包 pdfsam 4.0.1-1
正在处理用于 desktop-file-utils (0.23-4) 的触发器 ...
正在处理用于 mime-support (3.62) 的触发器 ...
在处理时有错误发生:
 pdfsam_5.0.2-1_amd64.deb

@englianhu
Copy link
Contributor Author

englianhu commented Jan 18, 2024

## Linux下wget命令详解 https://baijiahao.baidu.com/s?id=1715589159640466321
# curl -N https://github.com/torakiki/pdfsam-visual-public/releases/download | sed -n '/_amd64.deb/p' | head -n4 #前四行的文件
# curl -N https://github.com/torakiki/pdfsam-visual-public/releases/download | sed -n '/_amd64.deb/p'
# curl -l https://github.com/torakiki/pdfsam-visual-public/releases/download | sed -n '/_amd64.deb/p'

wget https://github.com/torakiki/pdfsam-visual-public/releases/download/v5.0.0/pdfsam-visual_5.0.0_amd64.deb
sudo apt install -y ./*.deb && sudo rm -rf *.deb
sudo mv /opt/pdfsam-visual /usr/lib/pdfsam-visual
sudo chmod 777 -R /usr/lib/pdfsam-visual
sudo micro /usr/share/applications/pdfsam-visual.desktop
#Exec=/usr/lib/pdfsam-visual/pdfsam-visual %U
sudo cp /usr/share/applications/pdfsam-visual.desktop /home/englianhu/桌面
sudo chmod +x /home/englianhu/桌面/pdfsam-visual.desktop
# 下载并安装最新版本电子书分合(虚拟版)
wget https://github.com/torakiki/pdfsam-visual-public/releases/download/v5.2.0/pdfsam-visual_5.2.0_amd64.deb
sudo apt install -y ./*.deb && sudo rm -rf *.deb
sudo mv /opt/pdfsam-visual /usr/lib/pdfsam-visual
sudo chmod 777 -R /usr/lib/pdfsam-visual
sudo  sed -i 's/Exec=\/opt/Exec=\/usr\/lib/g' /usr/share/applications/pdfsam-visual.desktop
sudo sed -i 's/Name=\(.*\)/Name=电子书分合(虚拟版)/g' /usr/share/applications/pdfsam-visual.desktop
sudo cp /usr/share/applications/pdfsam-visual.desktop /home/englianhu/桌面
sudo chmod +x /home/englianhu/桌面/pdfsam-visual.desktop
sudo mv /home/englianhu/桌面/pdfsam-visual.desktop /home/englianhu/桌面/电子书分合(虚拟版).desktop
# 下载并安装最新版本电子书分合(基本版)
wget https://github.com/torakiki/pdfsam/releases/download/v5.2.0/pdfsam-5.2.0-linux.tar.gz
sudo tar -C /usr/lib -xzvf *.tar.gz && sudo rm -rf *.tar.gz
sudo mv /usr/lib/pdfsam-5.2.0-linux /usr/lib/pdfsam
sudo chmod +x /usr/lib/pdfsam/bin/pdfsam.bat
sudo chmod +x /usr/lib/pdfsam/bin/pdfsam.sh
# /usr/lib/pdfsam/bin/pdfsam.sh %F
sudo sed -i 's/Name=\(.*\)/Name=电子书分合(基本版)/g' /usr/share/applications/pdfsam.desktop
sudo sed -i 's/Exec=\(.*\)/Exec=\/usr\/lib\/pdfsam\/bin\/pdfsam.sh \%F/g' /usr/share/applications/pdfsam.desktop
sudo cp /usr/share/applications/pdfsam.desktop /home/englianhu/桌面
sudo chmod +x /home/englianhu/桌面/pdfsam.desktop
sudo mv /home/englianhu/桌面/pdfsam.desktop /home/englianhu/桌面/电子书分合(基本版).desktop

@englianhu
Copy link
Contributor Author

englianhu commented Feb 22, 2024

wget https://github.com/torakiki/pdfsam/releases/download/v5.2.2/pdfsam_5.2.2-1_amd64.deb
sudo apt install -y ./*.deb && sudo rm -rf *.deb
sudo mv /opt/pdfsam-basic/ /usr/lib/pdfsam
sudo chmod +x /usr/lib/pdfsam/bin/pdfsam.bat
sudo chmod +x /usr/lib/pdfsam/bin/pdfsam.sh
# /usr/lib/pdfsam/bin/pdfsam.sh %F
sudo micro /usr/share/applications/pdfsam.desktop

## 建立文件后复制粘贴以下[Dektop Entry]建立个桌面应用捷径链接
[Desktop Entry]
Version=1.0
Type=Application
Name=电子书分合(基本版)
Comment=电子书结合分割工具
Exec=/usr/lib/pdfsam/bin/pdfsam.sh %F
Icon=/usr/lib/pdfsam/pdfsam-basic/icon.svg

sudo chmod +x /usr/share/applications/pdfsam.desktop
sudo chmod +x /home/englianhu/桌面/电子书分合(基本版).desktop
sudo chmod 777 -R /home/englianhu/桌面/电子书分合(基本版).desktop
# sudo sed -i 's/Name=\(.*\)/Name=电子书分合(基本版)/g' /usr/share/applications/pdfsam.desktop
# sudo sed -i 's/Exec=\(.*\)/Exec=\/usr\/lib\/pdfsam\/bin\/pdfsam.sh \%F/g' /usr/share/applications/pdfsam.desktop
sudo cp /usr/share/applications/pdfsam.desktop /home/englianhu/桌面
sudo chmod +x /home/englianhu/桌面/pdfsam.desktop
sudo mv /home/englianhu/桌面/pdfsam.desktop /home/englianhu/桌面/电子书分合(基本版).desktop
# 下载并安装最新版本电子书分合(基本版)
wget https://github.com/torakiki/pdfsam/releases/download/v5.2.2/pdfsam_5.2.2-1_amd64.deb
sudo apt install -y ./*.deb && sudo rm -rf *.deb
sudo mv /opt/pdfsam-basic /usr/lib/pdfsam
sudo chmod 777 -R /usr/lib/pdfsam
sudo  sed -i 's/Exec=\/opt/Exec=\/usr\/lib/g' /usr/share/applications/pdfsam.desktop
sudo  sed -i 's/Path=\/opt/Path=\/usr\/lib/g' /usr/share/applications/pdfsamdesktop
sudo  sed -i 's/Icon=\/opt/Icon=\/usr\/lib/g' /usr/share/applications/pdfsam.desktop
sudo sed -i 's/Name=\(.*\)/Name=电子书分合(基本版)/g' /usr/share/applications/pdfsam.desktop
sudo cp /usr/share/applications/pdfsam.desktop /home/englianhu/桌面
sudo chmod +x /home/englianhu/桌面/pdfsam.desktop
sudo mv /home/englianhu/桌面/pdfsam.desktop /home/englianhu/桌面/电子书分合(基本版).desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant