libffi-d78936b1.so.6.0.4:无法打开共享对象文件AWS Lambda函数上的错误 [英] libffi-d78936b1.so.6.0.4: cannot open shared object file Error on AWS Lambda function

查看:312
本文介绍了libffi-d78936b1.so.6.0.4:无法打开共享对象文件AWS Lambda函数上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用watson_developer_cloud sdk部署python Lambda软件包.密码学是此程序包具有的许多依赖项之一.我已经在Linux机器上构建了这个软件包.我的程序包也包含.libffi-d78936b1.so.6.0.4隐藏文件.但是我的lambda函数仍然无法访问它.我仍然收到"libffi-d78936b1.so.6.0.4:无法打开共享对象文件"错误. 我已经按照以下说明在Vagrant服务器上构建了我的软件包:

I am trying to deploy a python Lambda package with watson_developer_cloud sdk. Cryptography is one of many dependencies this package have. I have build this package on Linux machine. My package includes .libffi-d78936b1.so.6.0.4 hidden file too. But it is still not accessible to my lambda function. I am still getting 'libffi-d78936b1.so.6.0.4: cannot open shared object file' Error. I have built my packages on Vagrant server, using instructions from here: https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html#with-s3-example-deployment-pkg-python

确切错误:

Unable to import module 'test_translation': libffi-d78936b1.so.6.0.4: cannot open shared object file: No such file or directory

请注意,如本解决方案所述,我已经创建了我的包使用 zip -r9 $ DIR/lambda_function.zip 代替*.但这仍然对我不起作用.

On a note, as explained in this solution, I have already created my package using zip -r9 $DIR/lambda_function.zip . instead of *. But it is still not working for me.

任何方向都是非常可取的.

Any direction is highly appreciable.

推荐答案

libffi-d78936b1.so.6.0.4位于名为.libs_cffi_backend的隐藏文件夹中.

The libffi-d78936b1.so.6.0.4 is in a hidden folder named .libs_cffi_backend.

因此,要将此隐藏文件夹添加到lambda zip中,您应该执行以下操作:

So to add this hidden folder in your lambda zip, you should do something like:

zip -r ../lambda_function.zip * .[^.]*

这将在上面的目录中创建一个名为lambda_function.zip的zip文件,其中包含当前目录中的所有文件(第一个*)以及以.*开头但不是..*的所有内容([^.] )

That will create a zip file in the directory above with the name lambda_function.zip, containing all files in the current directory (first *) and every thing starting with .* but not ..* ([^.])

这篇关于libffi-d78936b1.so.6.0.4:无法打开共享对象文件AWS Lambda函数上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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