如何在Windows上构建qpdf? [英] How to build qpdf on Windows?

查看:671
本文介绍了如何在Windows上构建qpdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行我的R-package的检查时(通过devtools::check()),我会遇到警告''qpdf' is needed for checks on size reduction of PDFs.我发现这个问题,如果有人建议(如果我正确理解答案的话)运行并查看是否找到qpdf.就我而言,这只是返回

When running the checks for my R-package (via devtools::check()) I face the warning ''qpdf' is needed for checks on size reduction of PDFs. I found this question were it was suggested (if I understood the answer correctly) to run Sys.which(Sys.getenv("R_QPDF", "qpdf")) and see whether qpdf is found or not. In my case this just returns

qpdf ""

qpdf ""

所以,我认为我没有正确安装qpdf.不幸的是,在Windows上安装qpdf似乎很复杂.我的第一个问题是:为Windows安装qpdf真的是那么痛苦和复杂吗?还是有一个简单的解决方案?

so, I think I didn't install qpdf correctly. Unfortunately it seems to be quite complicated to install qpdf on Windows. My first side question is: does it really is so painful and complicated to install qpdf for Windows or is there an easy solution?

我一直按照说明进行操作,直到据说将C:\ MinGW-w64 \ bin和C:\ MinGW-w64 \ lib \ mingw添加到PATH变量中为止.但是随后,我没有找到安装 qpdf的其他具体说明,而仅是关于如何使用其他程序来构建 qpdf的说明.第二个问题是:我的假设是否正确,因为我在 build qpdf中安装了 之后?但是真正的问题是:构建qpdf的最佳方法是什么?我在C:\ MinGW \ msys \中尝试了使用MinGW构建"部分中的./config-mingw32./config-mingw64命令. 1.0 \ bin \ bash.exe,但收到错误消息./config-mingw32: No such file or directory,并且不知道如何解决此问题.

I've followed the instructions until it is said to add C:\MinGW-w64\bin and C:\MinGW-w64\lib\mingw to the PATH variable. But then I don't find further specific instructions to install qpdf, only about how to build qpdf with different other programs. The second side question is: is my assumption correct that after I've build qpdf it is installed? But the real question is: What is the best way to build qpdf? I tried the ./config-mingw32 and ./config-mingw64 commands from the section "Building with MinGW" in my C:\MinGW\msys\1.0\bin\bash.exe but got the error messages ./config-mingw32: No such file or directory and have no idea how to fix this issue.

我正在使用Windows 10 R 3.3.2版本已修补(2017-01-07 r71934)-"Sincere Pumpkin Patch"和RStudio 1.0.136.

I'm using Windows 10, R version 3.3.2 Patched (2017-01-07 r71934) -- "Sincere Pumpkin Patch" and RStudio 1.0.136.

推荐答案

您基本上不需要在Windows上构建文件.请按照以下三个步骤操作:

You basically do not need to build the file on windows. Please follow three steps below:

  1. https://sourceforge.net/projects/qpdf/?source下载适用于Windows的qpdf = typ_redirect
  2. 提取临时文件夹中的文件
  3. bin 文件夹的内容复制到%SystemRoot%\ System32
  1. Download qpdf for windows from https://sourceforge.net/projects/qpdf/?source=typ_redirect
  2. Extract files in a temp folder
  3. Copy the contents of the bin folder to %SystemRoot%\System32

工作完成!

Sys.which(Sys.getenv("R_QPDF", "qpdf"))
                             qpdf 
"C:\\WINDOWS\\SYSTEM32\\qpdf.exe" 

这篇关于如何在Windows上构建qpdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆