vapor/vapor

Amazon linux 2 run hello demo error

yuezyVSCodeSync opened this issue · 4 comments

Snipaste_2023-07-14_16-42-48

use vapor on Amazon linux 2

vapor new hello -n

ca hello 

swfit run

then show the error in the pic

  • swift verison 5.8.1
  • vapor tool 18.7.1

I think on ubuntu when I had zlib missing it was due to swift not being installed correctly such as not having all the prereqs like build-essentials installed. Idk about AL2 but on ubuntu I stopped having these problems using the install script from swiftlang.xyz vs the install steps at swift.org. I assume swift --version works, but does a simple print("hello world") compile?
I recall having to install libzlib-dev or something when I had a simmilar issue on ubuntu.

vzsg commented

On Amazon Linux 2, the missing package is called zlib-devel.
Install it with yum, and the error should go away.

but it's not ubuntu
Amazon Linux 2 don't have libzlib-dev

0xTim commented

@yuezyVSCodeSync See the updated comment from @vzsg with the package you need to install