OctopusCLI for Linux can't push (DLLNotFound)

I am trying to programmatically push a package to my Octopus server, and unfortunately running into issues. I’ve got OctopusCLI version 4.12 installed, and am running the below command from the folder which contains my product.zip:

/var/lib/jenkins/OctopusCLI/Octo push --package=product.zip --replace-existing --server https://octopus.ABC.co.uk/ --apikey XYZ

The error is as follows:

 (Exception from HRESULT: 0x8007007E)
   at Interop.HttpInitializer.EnsureCurlIsInitialized()
   at Interop.HttpInitializer..cctor()
   --- End of inner exception stack trace ---
   at Interop.HttpInitializer.Initialize()
   at Interop.Http..cctor()
   --- End of inner exception stack trace ---
   at Interop.Http.GetSupportedFeatures()
   at System.Net.Http.CurlHandler..cctor()
   --- End of inner exception stack trace ---
   at System.Net.Http.CurlHandler..ctor()
   at Octopus.Client.OctopusAsyncClient..ctor(OctopusServerEndpoint serverEndpoint, OctopusClientOptions options, Boolean addCertificateCallback)
   at Octopus.Client.OctopusAsyncClient.<Create>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Create>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Commands.ApiCommand.<Execute>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Program.Run(String[] args)```

Unfortunately, this DLL does infact exist as a shared object:

```root@devjenkins0:/var/lib/jenkins/OctopusCLI# ls -la | grep Http
-rwxrwxrwx  1 root    root     287576 Nov  4 18:56 System.Net.Http.dll
-rwxrwxrwx  1 root    root      12608 Nov  4 18:22 System.Net.Http.Native.so```

Any ideas?

Yes,libcurl3-gnutls is installed :slight_smile:

Right, installing these and all their dependencies gets past the error:

apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev

However, now there’s an error inside Octopus Server itself:

Octopus Server returned an error: Illegal characters in path.
Server exception:
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileMode mode, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.8\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 184
   at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.8\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 177
   at Octopus.Server.Web.Api.NuGet.PackagePushActionBase`1.SaveToTemporaryLocation(HttpFile packageFile) in Y:\work\refs\tags\3.3.8\source\Octopus.Server\Web\Api\NuGet\PackagePushActionBase.cs:line 117
   at Octopus.Server.Web.Api.NuGet.PackagePushActionBase`1.Execute() in Y:\work\refs\tags\3.3.8\source\Octopus.Server\Web\Api\NuGet\PackagePushActionBase.cs:line 58
   at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.3.8\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
   at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.3.8\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
-----------------------

Error from Octopus server (HTTP 500 InternalServerError)
Exit code: -7```

Hi William,

Thanks for getting in touch! Great job on the troubleshooting so far. I think the latest error is due to the fact you are trying to upload product.zip. We require all packages to have a version defined as it is necessary for promotion and identity.
If you rename it to product.1.0.0.zip can you let me know if it resolves the error?

Thanks,
Vanessa