@BenjaminW. is right (in the comments). Thanks.
First, I just changed runs on: ubuntu-latest
to runs on: ubuntu-22.04
.
Then I tried this:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install libmagickwand-dev
run: sudo apt-get install libmagickwand-dev
Both work, and I'm not sure which solution is better.