我正在按照概述的步骤进行这里,我做到了:
mkdir otf
cp /Applications/Adobe\ Reader.app/Contents/Resources/Resource/Font/MinionPro*.otf otf
./scripts/makeall MinionPro
sudo ./scripts/install $(kpsewhich -var TEXMFLOCAL)
sudo mkdir -p $(kpsewhich -var TEXMFLOCAL)/web2c
sudo echo Map MinionPro.map >> $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg
最后一行是我要说的
bash: $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg: Permission denied
我真的不知道该怎么做。我天真地先尝试创建文件,但无济于事:
$ sudo touch $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg
$ sudo echo Map MinionPro.map > $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg
bash: $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg: Permission denied
我该如何继续?
答案1
当使用sudo some_program >> some_file
only时some_program
,将以提升的权限执行。写入将some_file
使用普通用户权限。正常的解决方案是
some_program | sudo tee -a some_file
程序tee
以提升的权限执行,以便能够写入some_file
。因此,对于你的情况
echo Map MinionPro.map | sudo tee -a $(kpsewhich -var TEXMFLOCAL)/web2c/updmap.cfg
答案2
确实,sudo echo
没用。诀窍是改为
$ echo Map MinionPro.map > updmap.cfg
$ sudo mv updmap.cfg $(kpsewhich -var TEXMFLOCAL)/web2c/