我正在使用 wkhtmltoimage 并且一切都很顺利,直到我要求它对 Twitter 进行截图并且我收到了这个奇怪的错误:
Loading page (1/2)
WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Rendering (2/2)
Done
这是我使用的命令:
xvfb-run wkhtmltoimage --format png --quality 100 http://twitter.com/jnbdz twitter2.png
我正在使用 Ubuntu 11、Apache2/PHP5 和 Qt4。
当我尝试获取 Google 或其他网站的屏幕截图时,我没有收到此错误。
当它工作时,我只得到这个:http ://dl.dropbox.com/u/20599297/twitter3.png
任何想法可能导致此错误?
更新
尝试截取 yahoo.com 的屏幕截图时出现不同的错误:
xvfb-run wkhtmltoimage --format png --quality 100 http://yahoo.com/ yahoo1.png
Loading page (1/2)
Error: Failed loading page http://yahoo.com/ (sometimes it will work just to ignore this error with --load-error-handling ignore)
Error: Failed loading page http://yahoo.com/ (sometimes it will work just to ignore this error with --load-error-handling ignore)