首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >QSslSocket:无法解决CRYPTO_num_locks

QSslSocket:无法解决CRYPTO_num_locks
EN

Stack Overflow用户
提问于 2022-09-26 03:42:36
回答 1查看 573关注 0票数 1

我试图使用wkhtmltopdf从HTML呈现PDF页面。当我试图调用Create时,它会给我带来许多关于QSslSocket: cannot resolve的错误。有人知道这里发生了什么吗?

代码语言:javascript
复制
func main() {
  tmpl, _ := template.ParseFiles("docs/template.html")
  if err != nil {
    fmt.Println(err)
  }

  tempBuff := new(bytes.Buffer)

  err = tmpl.Execute(tempBuff, data)
  if err != nil {
    fmt.Println(err)
  }

  page := wkhtmltopdf.NewPageReader(tempBuff)

  pdfGen, err := wkhtmltopdf.NewPDFGenrator()
  if err != nil {
    fmt.Println(err)
  }

  pdfGen.AddPage(page)
  pdfGen.Orientation.Set(wkhtmltopdf.OrientationLandscape)
  pdfGen.Dpi.Set(300)

  // Error happens here
  err = pdfGen.Create()
  if err != nil {
    fmt.Println(err)
  }
}

这些都是错误

代码语言:javascript
复制
Loading pages (1/6)
QSslSocket: cannot resolve CRYPTO_num_locks                  ] 10%
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method2%
QSslSocket: cannot call unresolved function SSL_library_init
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done                                                                      
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
EN

回答 1

Stack Overflow用户

发布于 2022-10-25 18:00:17

我发现了这一点,并修复了在Oracle LINUX上运行wkhtmltopdf时出现的问题:

代码语言:javascript
复制
sudo -i yum install compat-openssl10.x86_64
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73849434

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档