[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running LilyPond on Amazon Linux 2

From: Peter Anglea
Subject: Re: Running LilyPond on Amazon Linux 2
Date: Tue, 14 Jan 2020 17:33:45 -0500

I know I’m not the first to run LilyPond in a Lambda function. For instance, LilyBin ( has been using Lambda and S3 for a while to power their website. I took some cues from their site (which is open source on Github), but ultimately went my own route and made a custom Lambda function for my purposes.

I have started a website focused on engraving hymns for church music called Doxology. It allows users to generate custom sheet music for hymns, whether it be for piano, guitar, non-C instruments, or for projection. I use LilyPond to make the engravings which are customizable and transposable. The music files and dependencies (including LilyPond itself) are part of my Lambda function. The user customizations (ie. key signature, formatting, etc.) are fed into a Scheme evaluation that customizes the main template file for the song, if that makes sense. 

Since generating a score in LilyPond takes a good bit of bandwidth, I decided to offload that portion of my site to the cloud. I estimate I may be able to generate up to 100,000 hymn scores a month without exceeding the free tier. I’m still in “beta” so we’ll see if it really works over time. But so far, I’m happy with it.

On Jan 14, 2020, at 1:14 PM, Saul Tobin <address@hidden> wrote:

I'm curious to know about your use case/workflow for running Lilypond in AWS Lambda. Seems interesting.


On Tue, Jan 14, 2020, 6:34 AM Peter Anglea <address@hidden> wrote:
I think I got it fixed… recording this here for anyone else who stumbles upon the same issue as I did.

I downloaded an RPM containing, extracted the file, and put it inside LilyPond’s /usr/lib/ directory. I made sure to include the LilyPond directory as part of the include path for my function. Probably not the best long-term fix… if I update LilyPond in the future, I’ll need to remember to re-add libcrypt... but for now it works and my testing has generated scores without issue.

It should be noted that I am not a Linux pro, and am a little out of my depth on this one. So if there’s a more obvious fix, I’d love to hear about it.

> On Jan 11, 2020, at 12:07 PM, Peter Anglea <address@hidden> wrote:
> I’ve been running LilyPond on AWS Lambda for some time now, but recently have been forced to upgrade my runtime from Node 8.x to Node 12.x due to Node 8.x becoming deprecated. However, in my testing, LilyPond does not work in either the Node 10.x or Node 12.x runtimes. I get the following error:
> lilypond: error while loading shared libraries: cannot open shared object file: No such file or directory
> Note: I have been using the binary for GNU/Linux 64: LilyPond 2.19.83-1
> From what I can tell, the difference is that AWS Lambda’s Node 12.x runtime uses the “Amazon Linux 2” distro instead of regular “Amazon Linux” distro used with the Node 8.x runtime. Also, my research seems to indicate the error is related to Amazon Linux 2 using a different version of openssl from before… but that’s about the limit of what I understand.
> Is anyone else successfully running LilyPond on AWS Lambda Node 12.x? Is there another binary better suited to that particular distro? Any other suggestions for overcoming the error message above?
> Thanks in advance for any help. I’m kinda stuck here, but this mailing list has proven helpful many times, so… fingers crossed! :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]