Error in updating Coursier?

i won’t able to update Coursier 2.0.16. i want newer version because this version have a bug. can you please tell me how to update from Coursier 2.0.16 to Coursier 2.1.9?

Reinstall Coursier using the instructions:

You can then get Coursier to update itself to the latest version after that.

Have you tried cs update coursier?
Also cs update will update everything.
Just to be clear, right now coursier is on 2.1.9 and cs is on 2.1.1.

I ran into an exception when running cs update cs on 2.1.1. The solution was to remove my existing cs binary at ~/.local/share/coursier/bin/ and do coursier install cs. Now both coursier and cs are at 2.1.9.

The error was:
Exception in thread "main" java.lang.Exception: Reading /home/spam/.local/share/coursier/bin/cs
	at coursier.install.InfoFile$.upToDate(InfoFile.scala:186)
	at coursier.install.InstallDir.upToDate$lzycompute$1(InstallDir.scala:312)
	at coursier.install.InstallDir.upToDate$1(InstallDir.scala:307)
	at coursier.install.InstallDir.$anonfun$createOrUpdate$14(InstallDir.scala:315)
	at coursier.install.InstallDir.$anonfun$createOrUpdate$14$adapted(InstallDir.scala:302)
	at coursier.install.InstallDir.$anonfun$createOrUpdate$22(InstallDir.scala:408)
	at coursier.install.InstallDir.$anonfun$createOrUpdate$22$adapted(InstallDir.scala:407)
	at coursier.install.Updatable$.get$1(Updatable.scala:61)
	at coursier.install.Updatable$.$anonfun$writing$1(Updatable.scala:106)
	at coursier.cache.CacheLocks$.loop$1(CacheLocks.scala:73)
	at coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:93)
	at coursier.install.Updatable$.writing(Updatable.scala:106)
	at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:407)
	at coursier.install.InstallDir.createOrUpdate(InstallDir.scala:96)
	at coursier.cli.install.Install$.$anonfun$run$7(Install.scala:128)
	at coursier.cli.install.Install$.$anonfun$run$7$adapted(Install.scala:115)
	at scala.collection.immutable.List.foreach(List.scala:333)
	at coursier.cli.install.Install$.run(Install.scala:115)
	at coursier.cli.install.Install$.run(Install.scala:23)
	at coursier.cli.Coursier$.main(Coursier.scala:118)
	at coursier.cli.Coursier.main(Coursier.scala)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at coursier.bootstrap.launcher.a.a(Unknown Source)
	at coursier.bootstrap.launcher.Launcher.main(Unknown Source)
Caused by: zip END header not found
	at java.base/$Source.findEND(
	at java.base/$Source.initCEN(
	at java.base/$Source.<init>(
	at java.base/$Source.get(
	at java.base/$CleanableResource.<init>(
	at java.base/<init>(
	at java.base/<init>(
	at java.base/<init>(
	at coursier.install.InfoFile$.upToDate(InfoFile.scala:155)
	... 26 more

i got it but but coursier require java 8 but i have library which require scala 2.9.2 and java 7. can you please tell me how can i solve this?

Wow that’s really ancient.
I don’t know the solution, I don’t think you can solve this.
Those Scala and Java versions are not supported anymore right?
So they are probably not safe to use (not receiving security updates).
You should consider updating the library to at least Scala 2.13 and Java 11.

help me to build this library GitHub - twitter-archive/snowflake at snowflake-2010

last time i am able to build it successfully but now when i am trying then got error. my main programming language is other than scala. help me to build this library because i have to use it in production?

It was last updated 12 years ago. Using that in production would be a disaster waiting to happen! Very bad idea.

If you really must use Scala 2.9.2 and Java 7, you will not be able to use Coursier at all. You need to use tools and versions which existed circa 2012, which is when Scala 2.9.2 is from. Coursier didn’t exist then and doesn’t work with such old things.

When asking for computer help on the internet, always always always always show exactly what command you ran and exactly what the resulting output was, including the full text of any error messages.