Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert Command Not Found on Ubuntu 24.04 #2902

Closed
2 tasks done
dfuchss opened this issue Dec 18, 2024 · 12 comments · Fixed by #2906
Closed
2 tasks done

convert Command Not Found on Ubuntu 24.04 #2902

dfuchss opened this issue Dec 18, 2024 · 12 comments · Fixed by #2906
Labels

Comments

@dfuchss
Copy link
Contributor

dfuchss commented Dec 18, 2024

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

The convert command from ImageMagick fails to run in workflows using the latest ubuntu-latest tag in GitHub Actions. I guess this issue occurs because ubuntu:latest now uses Ubuntu 24.04 instead of 22.04.

How to reproduce the bug

Just build a website with images and look into the logs.

Error messages and logs

Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
       Imagemagick: Searching files in /home/runner/work/ardoco.github.io/ardoco.github.io/assets/img/
       Imagemagick: Generating image "/home/runner/work/ardoco.github.io/ardoco.github.io/_site/assets/img/icsa2019_poster-480.webp"
       Imagemagick: Command returned pid 1991 exit 127 with error sh: 1: convert: not found 
       Imagemagick: Generating image "/home/runner/work/ardoco.github.io/ardoco.github.io/_site/assets/img/icsa2019_poster-800.webp"

What operating system are you using?

Not applicable (e.g. you're using GitHub Pages or other hosting)

Where are you seeing the problem on?

Deployed site

More info

The page still reders, but the webp files are not generated anymore

@dfuchss dfuchss added the bug label Dec 18, 2024
@george-gca
Copy link
Collaborator

Can you give a link to your repository? I manually run the deploy action yesterday on this repo and everything run smoothly.

@dfuchss
Copy link
Contributor Author

dfuchss commented Dec 19, 2024

@dfuchss
Copy link
Contributor Author

dfuchss commented Dec 19, 2024

This commit is the interesting one: ArDoCo/ardoco.github.io@c33c080

And as far as I can see, the runner of the build before was 22.04 and for this commit it was 24.04.

@dfuchss
Copy link
Contributor Author

dfuchss commented Dec 19, 2024

Can you give a link to your repository? I manually run the deploy action yesterday on this repo and everything run smoothly.

Yes, this action still used "ubuntu 22.04.5" .. tbh I don't know how github decides whether to use 24.04 or 22.04 :D

-> actions/runner-images#10636

@george-gca
Copy link
Collaborator

george-gca commented Dec 19, 2024

Your deploy action is working just fine, every run of deploy, and I can see that it is using the latest ubuntu tag. What is the problem?

@ananthu-aniraj
Copy link

Hi @dfuchss, I had the same issue. A temporary work-around is to replace the "ubuntu-latest" in the github workflow files with "ubuntu-22.04" (https://github.com/actions/runner-images?tab=readme-ov-file#available-images)

The corresponding files can be seen here: https://github.com/search?q=repo%3Aalshedivat%2Fal-folio%20ubuntu-latest&type=code

@dfuchss
Copy link
Contributor Author

dfuchss commented Dec 19, 2024

Your deploy action is working just fine, every run of deploy, and I can see that it is using the latest ubuntu tag. What is the problem?

In the logs you can see that the creation of webp files fail silently :) so the srcSet of the images are empty . See https://github.com/ArDoCo/ardoco.github.io/tree/gh-pages/assets/img

The images are not being processed .

@george-gca
Copy link
Collaborator

Now I understand. The action that failed is actually not using ubuntu 24.04 as can be seen in the warning. I don't think this is actually the problem.

Hi @dfuchss, I had the same issue. A temporary work-around is to replace the "ubuntu-latest" in the github workflow files with "ubuntu-22.04" (https://github.com/actions/runner-images?tab=readme-ov-file#available-images)

Did this work for you? If it didn't, we can be sure it is not a problem of ubuntu version.

@dfuchss
Copy link
Contributor Author

dfuchss commented Dec 19, 2024

Now I understand. The action that failed is actually not using ubuntu 24.04 as can be seen in the warning. I don't think this is actually the problem.

Hi @dfuchss, I had the same issue. A temporary work-around is to replace the "ubuntu-latest" in the github workflow files with "ubuntu-22.04" (https://github.com/actions/runner-images?tab=readme-ov-file#available-images)

Did this work for you? If it didn't, we can be sure it is not a problem of ubuntu version.

Yes that works. After downgrading the version, the webp files are generated again.
If you look into the first phase of the actions you see the system that was used for the silently failing action is 24.04.

@lijiaqi
Copy link
Contributor

lijiaqi commented Dec 19, 2024

@dfuchss @george-gca
I solved this issue by manually adding an extra step to explicitly run sudo apt-get install -y imagemagick in the workflow file. This step should be put before - name: Install and Build 🔧.

This issue happened as it seems that imagemagick is not longer pre-installed in the ubuntu-24.04 github action environment. See here

...
      - name: Update _config.yml ⚙️
        uses: fjogeleit/yaml-update-action@main
        with:
          commitChange: false
          valueFile: "_config.yml"
          propertyPath: "giscus.repo"
          value: ${{ github.repository }}
      - name: Install imagemagick (convert)
        run: |
          sudo apt-get update
          sudo apt-get install -y imagemagick
      - name: Install and Build 🔧
        run: |
          pip3 install --upgrade nbconvert
          export JEKYLL_ENV=production
          bundle exec jekyll build
...

@george-gca
Copy link
Collaborator

Can you send a PR for this? Only 1 suggestion, move all install code inside the Install and Build step, like this:

      - name: Install and Build 🔧
        run: |
          sudo apt-get update && sudo apt-get install -y imagemagick
          pip3 install --upgrade nbconvert
          export JEKYLL_ENV=production
          bundle exec jekyll build

and also do that for the axe and broken-links-site actions?

@lijiaqi
Copy link
Contributor

lijiaqi commented Dec 19, 2024

@george-gca
Sure. Made it at #2906

george-gca pushed a commit that referenced this issue Dec 19, 2024
…Github actions (#2906)

Install `imagemagick` within `Install and Build 🔧` step of Github
actions

Relevant issue: 
[#2902](#2902) `convert`
Command Not Found on Ubuntu 24.04

Reason: 
`ubuntu-latest` in Github actions is pointed to `ubuntu-24.04` now, in
which `imagemagick` is no longer pre-installed. See
[this](actions/runner-images#10772).

Modified files (actions) recommended by @george-gca 
```
- .github/workflows/deploy.yml
- .github/workflows/broken-links-site.yml
- .github/workflows/axe.yml
```
Charlie-XIAO pushed a commit to Charlie-XIAO/Charlie-XIAO.github.io that referenced this issue Dec 20, 2024
…Github actions (#2906)

Install `imagemagick` within `Install and Build 🔧` step of Github
actions

Relevant issue: 
[#2902](alshedivat/al-folio#2902) `convert`
Command Not Found on Ubuntu 24.04

Reason: 
`ubuntu-latest` in Github actions is pointed to `ubuntu-24.04` now, in
which `imagemagick` is no longer pre-installed. See
[this](actions/runner-images#10772).

Modified files (actions) recommended by @george-gca 
```
- .github/workflows/deploy.yml
- .github/workflows/broken-links-site.yml
- .github/workflows/axe.yml
```
u10313335 pushed a commit to depositar/lab that referenced this issue Dec 22, 2024
…Github actions (alshedivat#2906)

Install `imagemagick` within `Install and Build 🔧` step of Github
actions

Relevant issue: 
[alshedivat#2902](alshedivat#2902) `convert`
Command Not Found on Ubuntu 24.04

Reason: 
`ubuntu-latest` in Github actions is pointed to `ubuntu-24.04` now, in
which `imagemagick` is no longer pre-installed. See
[this](actions/runner-images#10772).

Modified files (actions) recommended by @george-gca 
```
- .github/workflows/deploy.yml
- .github/workflows/broken-links-site.yml
- .github/workflows/axe.yml
```
blu-bird pushed a commit to blu-bird/blu-bird.github.io that referenced this issue Dec 27, 2024
…Github actions (alshedivat#2906)

Install `imagemagick` within `Install and Build 🔧` step of Github
actions

Relevant issue: 
[alshedivat#2902](alshedivat#2902) `convert`
Command Not Found on Ubuntu 24.04

Reason: 
`ubuntu-latest` in Github actions is pointed to `ubuntu-24.04` now, in
which `imagemagick` is no longer pre-installed. See
[this](actions/runner-images#10772).

Modified files (actions) recommended by @george-gca 
```
- .github/workflows/deploy.yml
- .github/workflows/broken-links-site.yml
- .github/workflows/axe.yml
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants