Ubuntu22.04安装配置typora

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下载也需要网络要求。

sudo apt-get update sudo apt-get install ubuntu-make [sudo] password for sqa: Hit:1 http://cn.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] Hit:3 https://typora.io/linux ./ InRelease Get:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB] Get:5 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [103 kB] Get:6 http://cn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [18.5 kB] Get:7 http://cn.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 DEP-11 Metadata [212 B] Get:8 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [359 kB] Get:9 http://cn.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] Get:10 http://cn.archive.ubuntu.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,080 B] Get:11 http://cn.archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 DEP-11 Metadata [212 B] Get:12 http://cn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [22.9 kB] Get:13 http://cn.archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 DEP-11 Metadata [212 B] Hit:15 https://download.docker.com/linux/ubuntu jammy InRelease Hit:16 https://dl.google.com/linux/chrome/deb stable InRelease Get:17 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [43.1 kB] Get:19 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B] Get:20 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [125 kB] Get:21 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B] Get:14 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease [29.9 kB] Err:14 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F6609E60DC62814E Reading package lists... Done W: GPG error: https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F6609E60DC62814E E: The repository 'https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu jammy InRelease' is not signed. 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. Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package ubuntu-make sqa@sqa-Precision-3480:~$ umake android Command 'umake' not found, but can be installed with: sudo snap install ubuntu-make
03-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值