title: GLIBC_2.2.5 not defined in file libpthread.so.0 with link time reference
body: <p>I'm creating a C# app which I have build or as they call it &quot;published&quot; for linux-x64 following this XML in the csproj:</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;Configuration&gt;release&lt;/Configuration&gt;
      &lt;InvariantGlobalization&gt;true&lt;/InvariantGlobalization&gt;
      &lt;TargetFramework&gt;net5.0&lt;/TargetFramework&gt;
      &lt;PublishSingleFile&gt;true&lt;/PublishSingleFile&gt;
      &lt;SelfContained&gt;true&lt;/SelfContained&gt;
      &lt;RuntimeIdentifier&gt;linux-x64&lt;/RuntimeIdentifier&gt;
      &lt;PublishTrimmed&gt;true&lt;/PublishTrimmed&gt;
      &lt;PublishReadyToRun&gt;true&lt;/PublishReadyToRun&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;mongocsharpdriver&quot; Version=&quot;2.11.6&quot; /&gt;
      &lt;PackageReference Include=&quot;MongoDB.Bson&quot; Version=&quot;2.11.6&quot; /&gt;
      &lt;PackageReference Include=&quot;MongoDB.Driver&quot; Version=&quot;2.11.6&quot; /&gt;
      &lt;PackageReference Include=&quot;MongoDB.Driver.Core&quot; Version=&quot;2.11.6&quot; /&gt;
      &lt;PackageReference Include=&quot;PCSC&quot; Version=&quot;5.0.0&quot; /&gt;
      &lt;PackageReference Include=&quot;PCSC.Iso7816&quot; Version=&quot;5.0.0&quot; /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>I'm on Linux Ubuntu 20.04 .</p>
  <p>I published the application using CLI to the folder bin/release etc etc. It ran just fine when I tested it. Now, for the main branch, I deleted all code. Moved the directory release up in the main directory, and pushed it to GIT.</p>
  <p>Whenever you try to run it now, it gives the following error:</p>
  <pre><code>./Appname: relocation error: ./Appname: symbol pthread_attr_init version GLIBC_2.2.5 not defined in file libpthread.so.0 with link time reference
  </code></pre>
  <p>As I'm not a native C# developer and still learning, I have absolutely no idea what this is about, except it apparently has something to do with me moving the directory (I quess?)</p>
  <p>Does anyone know what this error is or where it comes from, how to fix it, and how to prevent in the future? As I would like to be able to publish an application without errors.</p>
  <h1>solved</h1>
  <p>I Found the answer. There is another directory within the build directory called &quot;publish&quot; which contains the working executable. In other words. The exe is in the folder <code>release/net5.0/linux-x64/publish</code> instead of <code>release/net5.0/linux-x64</code>. When I run the executable from that directory, everything works just fine. For other newbies: It is in the folder <code>release</code> because my XML project file has a <code>Configuration field</code> set to <code>release</code>. It is in the folder <code>Debug</code> by default.
  <a href="https://i.stack.imgur.com/uMUa7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uMUa7.png" alt="i'm an idiot" /></a></p>