https://dev.azure.com.mcas.ms/digital/DevOps-SRE/_boards/board/t/Customer%20Engagement%20and%20Success/Backlog%20items?workitem=8537549

Sagar K 0 Reputation points
2025-06-16T07:18:18.2333333+00:00

Our Servers are running in Enterprise setup with OS version Red Hat Enterprise Linux Server release 7.9 . Recently our Azure pipelines started failing while executing the UniversalPackage task with the below error Found tool in cache: artifacttool 0.2.399 x64 Downloading package:-tdi-common-test, version: 0.0.140 using feed id: 7409e776-08bf-470f-bebb-468e40e97011, project: b41f9fa6-2d40-4006-acd9-006082d474a1 /u01/igacore/ado-agent-iga-tdi-test/_work/_tool/artifacttool/0.2.399/x64/artifacttool universal download --feed 7409e776-08bf-470f-bebb-468e40e97011 --service https://dev.azure.com-digital/ --package-name-tdi-common-test --package-version 0.0.140 --path /u01/igacore/ado-agent-iga-tdi-test/_work/1-tdi-Common --patvar UNIVERSAL_DOWNLOAD_PAT --verbosity None --project b41f9fa6-2d40-4006-acd9-006082d474a1 /u01/igacore/ado-agent-iga-tdi-test/_work/_tool/artifacttool/0.2.399/x64/artifacttool: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /u01/igacore/ado-agen-iga-tdi-test/_work/_tool/artifacttool/0.2.399/x64/artifacttool) /u01/igacore/ado-agent-iga-tdi-test/_work/_tool/artifacttool/0.2.399/x64/artifacttool: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by /u01/igacore/ado-agent-iga-tdi-test/_work/_tool/artifacttool/0.2.399/x64/artifacttool) ##[error]Error: An unexpected error occurred while trying to download the package. Exit code(1) While investigating we could see a new verison of artifacttool 0.2.399 is being downloaded and referred. Earlier piplelines used to work with the version 0.2.350 . 1.May I know why this new version is being downloaded and referred ? 2.Is it possible to make the latest version 0.2.399 to work with out OS version RHEL 7.9

Could you please let me know, hwo to resolve this error. I've tried multiple approaches, but it didnt worked.

Azure DevOps
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bodapati Harish 820 Reputation points Microsoft External Staff Moderator
    2025-06-16T10:29:24.03+00:00

    Hello Sagar K,

    This error occurs because Azure Pipelines automatically downloads the latest Artifact Tool when it isn’t already in your agent’s cache. The new 0.2.399 release was built against a more recent GCC C++ runtime and therefore looks for the GLIBCXX_3.4.20 and GLIBCXX_3.4.21 symbols. On RHEL 7.9, the system library /lib64/libstdc++.so.6 only provides up to GLIBCXX_3.4.19, so the tool fails to load those newer symbols. Your previous pipelines worked because version 0.2.350 did not require those symbols.

    To keep using 0.2.399 without upgrading your OS, you can install Red Hat’s Software Collections devtoolset-9 to provide a newer libstdc++. For example, on each self-hosted agent run

    
    sudo yum install -y centos-release-scl
    
    sudo yum install -y devtoolset-9
    
    scl enable devtoolset-9 bash
    
    export LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:$LD_LIBRARY_PATH
    
    

    Then start your agent or run the Universal Packages task inside that shell. The artifacttool binary will pick up the updated C++ libraries and run without error.

    If you’d prefer to continue using the version that already works, you can pin your pipeline to 0.2.350. Add an Artifact Tool installer step before your UniversalPackages task:

    
    - task: ArtifactToolInstaller@1
    
      inputs:
    
        versionSpec: '0.2.350'
    
    

    This ensures the older, compatible tool is present and stops the agent from fetching 0.2.399.

    For future resilience, you might consider building inside a container based on RHEL 8 or UBI 8, which include a modern C++ runtime by default and will stay compatible with upcoming Artifact Tool updates.

    Hope this helps!

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions, please reply back.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.