Mac卸载Pandoc

本文介绍如何在已经通过安装器安装Pandoc后,切换至Homebrew进行管理和卸载,提供了一个脚本示例,以及关于Homebrew优势的讨论。

在用Typora导出word时提示需要安装Pandoc,Pandoc有两种安装方式,第一种是通过安装器安装
在这里插入图片描述
第二种方式是使用brew

brew install pandoc

但如果你使用第一种方式安装了,但想卸载了使用第二种方式安装,该怎么卸载呢?

#!/usr/bin/perl

# Script to remove all files installed by the macOS pandoc installer
# and unregister the package.  Modified from a script contributed
# by Daniel T. Staal.

use warnings;
use strict;

use File::Spec;

# The main info: this is the list of files to remove and the pkg_id.
my $pkg_id    = 'net.johnmacfarlane.pandoc';

# Find which, if any, volume Pandoc is installed on.
my $volume;

# First check /, then other volumes on the box.
my $cur_test = `pkgutil --pkgs=$pkg_id`;
if ( $cur_test =~ m/$pkg_id/ ) {
   
   
    $volume = '/';
} else {
   
   
    opendir( my
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值