Ubuntu22.04安装配置typora

发布于:2025-09-11 ⋅ 阅读:(18) ⋅ 点赞:(0)

typora是一个非常好用,我习惯使用的md文件编译软件。在ubuntu22.04系统下,安装教程如下:

Typora 1.9.3-1 + Yporaject 安装教程(Ubuntu 22.04)

首先我要强调:软件版本选择1.9.3-1。其他版本我并没有成功。


① 卸载当前 Typora

先把现有的 Typora 移除干净:

sudo apt-get remove --purge typora -y 

sudo apt-get autoremove -y 

sudo apt-get autoclean

确认卸载完成:

typora --version

如果显示 command not found 就说明卸载干净了。


② 添加 Typora 官方源

cd ~/Downloads

wget -qO - https://typoraio.cn/linux/public-key.asc | sudo tee /etc/apt/trusted.gpg.d/typora.asc

sudo add-apt-repository 'deb https://typoraio.cn/linux ./'

sudo apt-get update

③ 安装指定版本(1.9.3-1)

列出仓库里能用的版本:

apt-cache madison typora

安装目标版本:

sudo apt-get install typora=1.9.3-1

防止之后被自动升级:

sudo apt-mark hold typora

验证版本:

typora --version

④ 下载并编译 Yporaject

cd ~/Downloads
git clone https://github.com/hazukieq/Yporaject.git
sudo apt install cargo -y
cd Yporaject/
cargo build

编译完成后,检查是否生成了:

ls target/debug

你应该能看到 node_inject


⑤ 使用 node_inject

Typora 默认安装在:查看是否存在。

/usr/share/typora/

node_inject 拷贝过去:

sudo cp target/debug/node_inject /usr/share/typora/

切换到 Typora 安装目录,并运行:

cd /usr/share/typora/
sudo ./node_inject

输出:

extracting node_modules.asar
adding hook.js
applying patch
packing node_modules.asar
done!

返回之前的Yporaject目录下,找到license-gen

cd license-gen/
cargo build
cargo run
会生成一个激活码:将邮箱号和激活码License填入激活界面。完成激活。
cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/license-gen`
License for you: ******-******-******-******

注意事项:

1、如果你要卸载typora,先把 typora 从“锁定”状态解除:

sudo apt-mark unhold typora

然后再执行卸载:

sudo apt-get remove --purge typora -y
sudo apt-get autoremove -y
sudo apt-get autoclean

2、cargo下载可能需要上网工具。typora下载也可能面临网络要求。Yporaject下载也需要网络要求。


网站公告

今日签到

点亮在社区的每一天
去签到