无法下载wkhtmltopdf for sendaspdf在Plone中添加 [英] cant download wkhtmltopdf for sendaspdf add on in Plone

查看:103
本文介绍了无法下载wkhtmltopdf for sendaspdf在Plone中添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我按照Dan的建议修改buildout.cfg文件后,尝试使用bin/buildout通过build安装wkhtmltopdf时,出现以下错误:

When I try to install wkhtmltopdf through build out by using bin/buildout after modifying the buildout.cfg file as suggested by Dan, I get the following error:

Updating wkhtmltopdf_executable.
mv: cannot stat `wkhtmltopdf-amd64': No such file or directory
chmod: cannot access `wkhtmltopdf': No such file or directory
Installing wkhtmltopdf.
wkhtmltopdf: Unable to extract the package /home/user/Plone/buildout-cache/downloads/94af137dfe94508c7d7bfab08214118c. Unknown format.
While:
  Installing wkhtmltopdf.
Error: Package extraction error

我已经完成了此链接中所说的所有内容: https://github.com/vincent- psarga/collective.sendaspdf

I have done everything it says in this link: https://github.com/vincent-psarga/collective.sendaspdf

我的构建文件现在看起来像这样:(buildout.cfg):

My buildout file now looks like this:(buildout.cfg):

############################################
#
# Buildout Configuration File for Standalone Plone
# ------------------------------------------------
#
# After making changes in this configuration file,
# you should run bin/buildout to update the components.
# 
# ALWAYS back up all Plone/Zope data and components
# before changing configuration.
# 
# Running "bin/buildout" will update your installation,
# installing missing components as necessary.
# 
# Use "bin/buildout -n" to update many components here to the newest
# available releases.
# This will update the add-on products you've added in the eggs= lines.
# This will not, however, upgrade Plone itself (or anything else you've
# pinned with a version specification). To upgrade Plone itself, see the
# comments in "Plone Component Versions".
#
# Tutorial instructions for using zc.buildout for
# configuration management are available at:
# http://plone.org/documentation/tutorial/buildout
# Full details at http://pypi.python.org/pypi/zc.buildout
#
############################################


[buildout]

############################################
# Plone Component Versions
# ------------------------
# This version of the Unified Installer has the components of Plone 4 
# preloaded so that it can install without an Internet connection.
# If you want to update, uncomment the "http://..." line below,
# edit it to point to the current version URL, comment out the 
# "versions.cfg" line and run "bin/buildout" while attached to the 
# Internet. Generally, you only want to do that as part of a planned migration.
# Note that if you are updating components, you should also check the versions
# section at the end of this file, since recipes or components other than
# those of Zope and Plone may need updating at the same time.
#
extends = 
    base.cfg
    versions.cfg
    http://dist.plone.org/release/4.2-latest/versions.cfg

# If you change your Plone version, you'll also need to update
# the repository below.
find-links +=
    http://dist.plone.org/release/4.2

############################################
# Ports
# -----
# Specify the port on which your Zope installation
# will listen:
http-address = 8080


# If you try to start Zope as root, it will change user id to run as
# the effective user specified here. This user id must own the var directory
# of your buildout.
effective-user = user


############################################
# Eggs
# ----
# Add an indented line to the eggs section for any Python
# eggs or packages you wish to include.
#
eggs =
    Plone
    Pillow
    lxml
    pisa
    pyPdf
    html5lib
    reportlab 
    collective.quickupload
    Products.reflecto
    Products.ploneboard
    Products.EasyNewsletter
    collective.subscribablesections
    Products.CMFNotification
    Products.PloneSubscription
    plone.app.ldap
    plone.app.theming
    collective.groupspace.content
    collective.groupspace.mail
    collective.groupspace.workflow
    collective.groupspace.roles
    collective.sendaspdf
    ftw.dashboard.portlets.favourites
    quintagroup.dropdownmenu
    Products.Carousel
    Products.ContentWellPortlets
    quintagroup.theme.lite
    zettwerk.ui
    collective.kuputabs
    collective.tabr
    collective.zipfiletransport  


# Optional Functionality
# ----------------------
# Uncomment the indented lines to include these add-on products.
# Documentation on all of them, along with many more products,
# is available at
# http://plone.org/products/
#
# Example products:
# * LinguaPlone provides tools for building multi-lingual sites
# * PloneFormGen provides through-the-web form building
#
#    Products.LinguaPlone==4.1.1
#    Products.PloneFormGen==1.7.0
#
# Note that versions may be specified here or in the [versions]
# section below. You should always specify versions that you know
# are compatible with the Plone release and at an acceptable
# development level.
#
# Commonly used development tools:
# Several excellent development tools are included in the develop.cfg
# buildout extension. Read it to learn how to activate these tools.


############################################
# ZCML Slugs
# ----------
# Some eggs need ZCML slugs to tell Zope to
# use them. This is increasingly rare.
zcml =
#    plone.reload
     ftw.dashboard.portlets.favourites
     collective.kuputabs


############################################
# Development Eggs
# ----------------
# You can use paster to create "development eggs" to
# develop new products/themes. Put these in the src/
# directory.
# You will also need to add the egg names in the
# eggs section above, and may also need to add them
# to the zcml section.
#
# Provide the *paths* to the eggs you are developing here:
develop =
#    src/my.package


############################################
# Debug Mode
# ----------
# Change debug-mode to "on" to run in development mode.
# This will dramatically slow Plone.
# 
debug-mode = off
# Add-on developers should turn deprecation warnings on
deprecation-warnings = off
# change verbose-security to "on" for useful security errors while developing
verbose-security = off


############################################
# Backup Directory
# ----------------
# Sets the target directory for the bin/backup and bin/snapshotbackup
# commands. Default is inside this project's var directory, but ideally
# this should be on a separate volume or backup server.
# 
backups-dir=${buildout:directory}/var


############################################
# Initial User
# ------------
# This is the user id and password that will be used to create the initial 
# user id that will allow you to log in and create a Plone site. This only
# sets the initial password; it will not allow you to change an already 
# existing password. If you change the admin password via the web interface,
# the one below will no longer be valid.
# If you find yourself locked out of your Zope/Python installation, you may
# add an emergency user via "bin/plonectl adduser".
user=admin:*******


############################################
# Parts Specification
#--------------------
# Specifies the components that should be included in the buildout.
# All the basics are in the base.cfg extension; you may add your
# own if you need them at the end of this file.
parts =
    instance
    zopepy
    zopeskel
    unifiedinstaller
    repozo
    backup
    chown 
    wkhtmltopdf
    wkhtmltopdf_executable

############################################
# Environment Variables
# ---------------------
# Some of the behavior of your Zope/Plone instances are controlled with OS
# environment variables. You may set those here in a key / value format.
# Some common settings:
#    * TZ allows you to set a time zone for systems where it's not
#      automatically available.
#    * zope_i18n_compile_mo_files allows for automatic compilation of
#      missing translation files (may slow startup).
#    * zope_i18n_allowed_languages allows you to limit the available
#      translations.
#    * PYTHON_EGG_CACHE determines where zipped python packages are unpacked
#      for use.
[instance]
environment-vars =
    zope_i18n_compile_mo_files true
    PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs
    WKHTMLTOPDF_PATH ${buildout:directory}/wkhtmltopdf


[wkhtmltopdf]
recipe = hexagonit.recipe.download
url = http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2

[wkhtmltopdf_executable]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds =
     cd ${buildout:directory}/parts/wkhtmltopdf
     mv wkhtmltopdf-amd64 wkhtmltopdf
     chmod +x wkhtmltopdf

############################################
# Versions Specification
# ----------------------
# Version information supplied here will "pin" Python packages to a particular
# version number, even when you use the "newest" flag running buildout.
# Specifying versions for all packages is a good idea and can prevent
# accidental changes when you add new packages to your buildout.
# Note that versions specified here will override those specified earlier
# in the configuration, including those from the Plone and Zope version
# config files.
#
[versions]
Cheetah = 2.2.1
Pillow = 1.7.6
Products.DocFinderTab = 1.0.5
ZopeSkel = 2.21.2
collective.recipe.backup = 2.4
plone.recipe.command = 1.1
plone.recipe.unifiedinstaller = 4.1
ftw.dashboard.portlets.favourites = 2.0
lxml = 2.3.4 

Vincet:这是我的base.cfg文件

Vincet: This is my base.cfg file

######################################################
# Base Configuration; used by both standalone and zeo,
# which extend it.
# ---------------------------------------------------

# Buildout instructions in this file are
# usually only changed by experienced developers.
#
# Beyond here there be dragons!

[buildout]
eggs-directory=../buildout-cache/eggs
download-cache=../buildout-cache/downloads

# Don't download new things unless needed to satisfy dependencies.
# Override this on the command line with the "-n" flag.
newest = false

# Pick final releases over newer development releases when it's
# possible to do so and still fulfil requirements. Note that explicit
# version specifications will override this preference.
prefer-final = true

versions = versions

# Add additional egg download sources here. dist.plone.org contains archives
# of Plone packages.
find-links =
    http://dist.plone.org
    http://download.zope.org/ppix/
    http://download.zope.org/distribution/
    http://effbot.org/downloads

# unzip all eggs for easier debugging
unzip = true

# Load the DumpPickedVersions extension, which will notify
# you of versions picked by buildout that were not specifically
# pinned. 
extensions = buildout.dumppickedversions


[instance]
# Use this section to install and configure a Zope operating
# instance.
# For options see http://pypi.python.org/pypi/plone.recipe.zope2instance
recipe = plone.recipe.zope2instance
# The line below sets only the initial password. It will not change an
# existing password.
user = ${buildout:user}
http-address = ${buildout:http-address}
# if we try to start as root, Zope will switch to the user below
effective-user = ${buildout:effective-user}
# change debug-mode to "on" to run in development mode
debug-mode = ${buildout:debug-mode}
# change verbose-security to "on" for detailed security
# errors while developing
verbose-security = ${buildout:verbose-security}
# change deprecation-warnings to "on" to get log warnings
# for deprecated usages.
deprecation-warnings = ${buildout:deprecation-warnings}
blob-storage = ${buildout:directory}/var/blobstorage

# If you want Zope to know about any additional eggs, list them here.
# e.g. eggs = ${buildout:eggs} my.package
eggs =
    ${buildout:eggs}

# If you want to register ZCML slugs for any packages, list them here.
# e.g. zcml = my.package my.other.package
zcml = ${buildout:zcml}

products = ${buildout:directory}/products

# You may also control the environment variables for the instance.
environment-vars = ${buildout:environment-vars}


[zopepy]
# installs a zopepy python interpreter that runs with your
# full Zope environment
recipe = zc.recipe.egg
eggs = ${buildout:eggs}
interpreter = zopepy
scripts = zopepy


[chown]
# This recipe is used to set permissions for root mode installs
# For options see http://pypi.python.org/pypi/plone.recipe.command
recipe = plone.recipe.command
command =echo Dummy references to force this to execute after referenced parts
    echo ${backup:location} ${unifiedinstaller:sudo-command}
    chmod 600 .installed.cfg
    find ${buildout:directory}/var -type d -exec chmod 700 {} \;
    chmod 744 ${buildout:directory}/bin/*
update-command = ${chown:command}


[unifiedinstaller]
# This recipe installs the plonectl script and a few other convenience
# items.
# For options see http://pypi.python.org/pypi/plone.recipe.unifiedinstaller
recipe = plone.recipe.unifiedinstaller
user = ${buildout:user}
primary-port = ${buildout:http-address}
sudo-command = 


[repozo]
# This recipe builds the repozo script for non-zeo installations.
recipe = zc.recipe.egg
eggs = ZODB3
scripts = repozo


[backup]
# This recipe builds the backup, restore and snapshotbackup commands.
# For options see http://pypi.python.org/pypi/collective.recipe.backup
recipe = collective.recipe.backup
location = ${buildout:backups-dir}/backups
snapshotlocation = ${buildout:backups-dir}/snapshotbackups








[zopeskel]
# installs paster and Zopeskel
recipe = zc.recipe.egg
eggs =
    ZopeSkel
    Paste
    PasteDeploy
    PasteScript
    ${buildout:eggs}

这是我的versions.cfg文件:

This is my versions.cfg file:

# http://dist.plone.org/release/4.1.4/versions.cfg

[buildout]
extends = 
    zopeapp-versions.cfg
    zope-versions.cfg
#    http://download.zope.org/zopetoolkit/index/1.0.5/zopeapp-versions.cfg
#    http://download.zope.org/Zope2/index/2.13.12/versions.cfg

[versions]
# Zope overrides
# Products.BTreeFolder2 2.13.4 causes a regression
Products.BTreeFolder2 = 2.13.3

# Buildout infrastructure
buildout.dumppickedversions = 0.5
collective.recipe.omelette = 0.12
mr.developer = 1.18
plone.recipe.alltests = 1.2
plone.recipe.zope2instance = 4.1.9
plone.recipe.zeoserver = 1.2.2
distribute = 0.6.24
setuptools = 0.6c11
z3c.coverage = 1.2.0
z3c.ptcompat = 1.0
z3c.template = 1.4.0

# External dependencies
Markdown = 2.0.3
PIL = 1.1.6
Unidecode = 0.04.1
elementtree = 1.2.7-20070827-preview
feedparser = 5.0.1
mailinglogger = 3.3.3
python-dateutil = 1.5
python-openid = 2.2.5
simplejson = 2.1.6

# Plone release
Plone                                 = 4.1.4
Products.ATContentTypes               = 2.1.6
Products.ATReferenceBrowserWidget     = 3.0
Products.Archetypes                   = 1.7.12
Products.CMFActionIcons               = 2.1.3
Products.CMFCalendar                  = 2.2.2
Products.CMFCore                      = 2.2.5
Products.CMFDefault                   = 2.2.2
Products.CMFDiffTool                  = 2.0
Products.CMFDynamicViewFTI            = 4.0.2
Products.CMFEditions                  = 2.1.7
Products.CMFFormController            = 3.0.2
Products.CMFPlacefulWorkflow          = 1.5.6
Products.CMFPlone                     = 4.1.4
Products.CMFQuickInstallerTool        = 3.0.5
Products.CMFTestCase                  = 0.9.11
Products.CMFTopic                     = 2.2.1
Products.CMFUid                       = 2.2.1
Products.contentmigration             = 2.0.3
Products.DCWorkflow                   = 2.2.4
Products.ExtendedPathIndex            = 2.9
Products.ExternalEditor               = 1.0
Products.GenericSetup                 = 1.6.5
Products.Marshall                     = 2.1.1
Products.MimetypesRegistry            = 2.0.3
Products.PasswordResetTool            = 2.0.7
Products.PlacelessTranslationService  = 2.0.3
Products.PloneLanguageTool            = 3.2.4
Products.PlonePAS                     = 4.0.11
Products.PloneTestCase                = 0.9.13
Products.PluggableAuthService         = 1.7.7
Products.PluginRegistry               = 1.3
Products.PortalTransforms             = 2.0.7
Products.ResourceRegistries           = 2.0.6
Products.SecureMailHost               = 1.1.2
Products.TinyMCE                      = 1.2.10
Products.ZopeVersionControl           = 1.1.3
Products.ZSQLMethods                  = 2.13.4
Products.i18ntestcase                 = 1.2
Products.kupu                         = 1.5.0
Products.statusmessages               = 4.0
Products.validation                   = 2.0
archetypes.kss                        = 1.7.1
archetypes.referencebrowserwidget     = 2.4.9
archetypes.schemaextender             = 2.1.1
borg.localrole                        = 3.0.2
collective.monkeypatcher              = 1.0.1
collective.testcaselayer              = 1.3
collective.z3cform.datetimewidget     = 1.0.5
five.customerize                      = 1.0.2
five.formlib                          = 1.0.4
five.globalrequest                    = 1.0
five.localsitemanager                 = 2.0.5
kss.core                              = 1.6.3
plone.app.blob                        = 1.5.1
plone.app.caching                     = 1.0.1
plone.app.content                     = 2.0.7
plone.app.contentmenu                 = 2.0.5
plone.app.contentrules                = 2.1.4
plone.app.controlpanel                = 2.1.3
plone.app.customerize                 = 1.2.2
plone.app.discussion                  = 2.1.3
plone.app.folder                      = 1.0.4
plone.app.form                        = 2.0.5
plone.app.i18n                        = 2.0.1
plone.app.imaging                     = 1.0.5
plone.app.iterate                     = 2.1.4
plone.app.jquerytools                 = 1.3.1
plone.app.kss                         = 1.6.2
plone.app.layout                      = 2.1.13
plone.app.linkintegrity               = 1.4.4
plone.app.locales                     = 4.0.11
plone.app.openid                      = 2.0.2
plone.app.portlets                    = 2.1.7
plone.app.redirector                  = 1.1.2
plone.app.registry                    = 1.0.1
plone.app.testing                     = 4.0.2
plone.app.upgrade                     = 1.1.5
plone.app.users                       = 1.1.3
plone.app.uuid                        = 1.0
plone.app.viewletmanager              = 2.0.2
plone.app.vocabularies                = 2.1.5
plone.app.workflow                    = 2.0.6
plone.app.z3cform                     = 0.5.7
plone.autoform                        = 1.0
plone.browserlayer                    = 2.1.1
plone.cachepurging                    = 1.0.3
plone.caching                         = 1.0
plone.contentrules                    = 2.0.1
plone.fieldsets                       = 2.0.1
plone.folder                          = 1.0.1
plone.i18n                            = 2.0
plone.indexer                         = 1.0
plone.intelligenttext                 = 2.0.1
plone.keyring                         = 2.0
plone.locking                         = 2.0.3
plone.memoize                         = 1.1.1
plone.openid                          = 2.0
plone.outputfilters                   = 1.1
plone.portlet.collection              = 2.0.4
plone.portlet.static                  = 2.0.1
plone.portlets                        = 2.0.2
plone.protect                         = 2.0
plone.registry                        = 1.0
plone.reload                          = 2.0
plone.scale                           = 1.2.2
plone.session                         = 3.5
plone.stringinterp                    = 1.0.5
plone.supermodel                      = 1.0.3
plone.testing                         = 4.0.3
plone.theme                           = 2.1
plone.transformchain                  = 1.0.2
plone.uuid                            = 1.0.2
plone.z3cform                         = 0.7.8
plonetheme.classic                    = 1.1.2
plonetheme.sunburst                   = 1.1.6
wicked                                = 1.1.9
z3c.autoinclude                       = 0.3.4
z3c.batching                          = 1.1.0
z3c.caching                           = 2.0a1
z3c.form                              = 2.5.1
z3c.formwidget.query                  = 0.5
z3c.zcmlhook                          = 1.0b1
zope.globalrequest                    = 1.0

您能告诉我我做错了什么吗?帮助将不胜感激.谢谢

Can you please tell me what I did wrong?. Help will be deeply appreciated. Thank you

推荐答案

按照 https中的说明进行操作: //github.com/vincent-psarga/collective.sendaspdf 为我工作.

编辑:啊,既然您已经发布了整个buildout.cfg,那么我可以看到问题所在. parts =节必须是[buildout]节的一部分.当前位于[wkhtmltopdf_executable]下.

Edit: Ah, now that you've posted your entire buildout.cfg I can see the problem. The parts = section must be part of the [buildout] stanza. It is currently under [wkhtmltopdf_executable].

设置初始用户也一样.请注意,您已经包含了管理员密码,因此,如果确实是该密码,我现在将对其进行更改!

Same goes for setting the initial user. Note that you've included the admin password, so if that really is the password I would change it now!

这篇关于无法下载wkhtmltopdf for sendaspdf在Plone中添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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