假设我们有一个名为 的自定义 Python 包,位于shared_package私有存储库中,托管在 github 或 bitbucket 上。我们的私有存储库配置为通过 SSH 进行只读访问,如此处的 github和此处的 bitbucket所示。
我们的另一个项目(恰当地命名为 )dependent_project依赖于此shared_package,并且需要部署到 AWS Elastic Beanstalk (EB)。我们的环境使用最新的“Python on Amazon Linux 2”平台,并用作pipenv包管理器。
shared_package由于各种原因,对我们来说,直接从在线 git 存储库安装是最方便的,如此处针对 pipelinenv和此处针对 pip 的描述。我们Pipfile的dependent_project看起来像这样:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
shared_package = {git = "ssh://bitbucket.org/our_username/shared_package.git", editable = true, ref = "2021.0"}
[dev-packages]
awsebcli = "*"
[requires]
python_version = "3.8"
Run Code Online (Sandbox Code Playgroud)
这在我们的本地开发系统上运行良好,但在部署 …
拥有一个正在运行的 AWS EC2 实例Amazon Linux AMI 2。喜欢安装就可以PostgreSQL Server 13了。按照此处提到的说明进行操作 - https://www.postgresql.org/download/linux/redhat/
但是,执行时 -
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
出现以下错误 -
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Failed to set locale, defaulting to C
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
pgdg-redhat-repo-latest.noarch.rpm | 8.1 kB 00:00:00
Examining /var/tmp/yum-root-TO1dIc/pgdg-redhat-repo-latest.noarch.rpm: pgdg-redhat-repo-42.0-24.noarch
Marking /var/tmp/yum-root-TO1dIc/pgdg-redhat-repo-latest.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat-repo.noarch 0:42.0-24 will be installed
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-24.noarch
amzn2-core | 3.7 kB 00:00:00 …Run Code Online (Sandbox Code Playgroud) postgresql amazon-web-services amazon-linux amazon-linux-2 postgresql-13
我试图在我的服务器上运行 npm install 并收到此错误。
> node-cron@2.0.3 postinstall /home/workspace/AgreementCancellationProd/retrymechanism/node_modules/node-cron
> opencollective-postinstall
/usr/bin/env: node: Permission denied
npm WARN retrymechanism@1.0.0 No description
npm WARN retrymechanism@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! node-cron@2.0.3 postinstall: `opencollective-postinstall`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the node-cron@2.0.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be …Run Code Online (Sandbox Code Playgroud) 我正在将我的服务器从 AL2 升级到 Amazon Linux 2023。我的应用程序需要 wkhtmltopdf,现在在尝试安装它时,我发现它尚未在我的特定操作系统版本上正式发布。我已经尝试安装 AL2 的版本,但在安装所有依赖项后,它仍然缺少 libpng。
我尝试在 AL2 aarch64 下从https://wkhtmltopdf.org/downloads.html下载 .rpm 文件并运行sudo yum install wkhtmltox-0.12.6-1.amazonlinux2.aarch64.rpm。它似乎安装正确,但执行示例wkhtmltopdf google.com google.pdf失败。关于如何在 Amazon Linux 2023 中构建 wkhtmltopdf 有什么想法吗?
在一个侧面问题上。我看到与该库关联的 Github 存储库已存档,我是否应该考虑将应用程序的 PDF 生成迁移到其他库?
[ec2-user@backoffice ~]$ sudo yum install wkhtmltox-0.12.6-1.amazonlinux2.aarch64.rpm
Last metadata expiration check: 1:02:21 ago on Mon Nov 20 20:13:06 2023.
Dependencies resolved.
===========================================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================================
Installing:
wkhtmltox aarch64 1:0.12.6-1.amazonlinux2 @commandline 13 M
Installing dependencies:
cairo aarch64 1.17.6-2.amzn2023.0.1 amazonlinux …Run Code Online (Sandbox Code Playgroud) ruby wkhtmltopdf amazon-linux amazon-linux-2 amazon-linux-2023
amazon-linux ×2
git ×1
javascript ×1
node-cron ×1
node.js ×1
npm-install ×1
pipenv ×1
postgresql ×1
ruby ×1
ssh ×1
wkhtmltopdf ×1