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

deno upgrade error: No such file or directory (os error 2) #7085

Closed
darkRaspberry opened this issue Aug 17, 2020 · 24 comments · Fixed by #12693
Closed

deno upgrade error: No such file or directory (os error 2) #7085

darkRaspberry opened this issue Aug 17, 2020 · 24 comments · Fixed by #12693
Labels
bug Something isn't working correctly cli related to cli/ dir windows Related to Windows platform

Comments

@darkRaspberry
Copy link

darkRaspberry commented Aug 17, 2020

MACHINE: WSL 2 (Ubuntu 20.04)
OS: Ubuntu 20.04

Current version: 1.2.3

What's wrong

dev@Raspberry:~$ deno upgrade
Checking for latest version
downloading https://github.com/denoland/deno/releases/download/v1.3.0/deno-x86_64-unknown-linux-gnu.zip
Version has been found
Deno is upgrading to version 1.3.0
downloading https://github-production-release-asset-2e65be.s3.amazonaws.com/133442384/c3e0d480-dd82-11ea-837c-81e79e8669bd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200817T130905Z&X-Amz-Expires=300&X-Amz-Signature=649fcd47675f065db1f1c92b223489d8645ec52e03f3c566d20bc9a116a2ad22&X-Amz-SignedHeaders=host&actor_id=0&repo_id=133442384&response-content-disposition=attachment%3B%20filename%3Ddeno-x86_64-unknown-linux-gnu.zip&response-content-type=application%2Foctet-stream
Version has been found
Deno is upgrading to version 1.3.0
error: No such file or directory (os error 2)

What's expected.
Succesful upgrade.

@darkRaspberry
Copy link
Author

darkRaspberry commented Aug 17, 2020

How to collect logs?
Can anyone tell me.

@darkRaspberry
Copy link
Author

Duplicate but closed
#6057

@lucacasonato
Copy link
Member

Can you run again with -Ldebug?

@ry
Copy link
Member

ry commented Aug 17, 2020

@darkRaspberry What version of deno do you have currently? Getting an strace of this might help us debug.

@darkRaspberry
Copy link
Author

Thats prety long
how do i paste it here.

@lucacasonato
Copy link
Member

how do i paste it here.

Create a gist, and share the link here.

@darkRaspberry
Copy link
Author

@darkRaspberry What version of deno do you have currently? Getting an strace of this might help us debug.

v1.2.3

@darkRaspberry
Copy link
Author

darkRaspberry commented Aug 17, 2020

@bartlomieju bartlomieju changed the title error: No such file or directory (os error 2) deno upgrade error: No such file or directory (os error 2) Aug 27, 2020
@bartlomieju bartlomieju added bug Something isn't working correctly cli related to cli/ dir windows Related to Windows platform labels Aug 27, 2020
@darkRaspberry
Copy link
Author

Its on wsl ubuntu seems less connected to windows more WSL

@lucacasonato
Copy link
Member

@toshirot Are you using WSL?

@toshirot
Copy link

toshirot commented Dec 8, 2020

I'm using VirtualBox on win10

@darkRaspberry
Copy link
Author

@toshirot Are you using WSL?

I was using WSL at that time.
I now completely shifted to Ubuntu,

@eeve
Copy link

eeve commented Dec 14, 2020

same error

I first installed it with pacman
after that, an error will be reported when using deno upgrade

[root@archlinux working]# uname -a
Linux archlinux 5.8.8-arch1-1 #1 SMP PREEMPT Wed, 09 Sep 2020 18:59:45 +0000 x86_64 GNU/Linux
[root@archlinux working]# deno -V
deno 1.4.1

https://pastebin.ubuntu.com/p/Q9fmsGRdSz/

@nktpro
Copy link

nktpro commented Apr 15, 2021

Just ran into this as well, and I finally figured out that it was because unzip was missing. deno upgrade ... and deno compile --lite ... requires unzip to extract the downloaded archive - hence the No such file or directory (os error 2) error. Hopefully this will help someone else.

@darkRaspberry
Copy link
Author

unzip is always available in linux in normal condition. At time of getting this error i had installed unzip and it in working conditions.
May be there are some different reasons for this..

@acollins1991
Copy link

Still getting this error on Ubuntu 20.04.2 LTS, trying to upgrade from v1.12.2 to v1.13.1:

Looking up latest version
Found latest version 1.13.1
Checking https://github.com/denoland/deno/releases/download/v1.13.1/deno-x86_64-unknown-linux-gnu.zip
31.3 MiB / 31.3 MiB (100.0%)
Deno is upgrading to version 1.13.1
error: No such file or directory (os error 2)

@lhartmann
Copy link

IMHO depending on unzip is probaly not an issue, but the cryptic error message is a problem.

Some linux distributions do not include unzip by default, notably Debian GNU/Linux 10 (buster), which I am running. Ran apt install unzip, and now deno upgrade works.

Another option is to provide additional upgrade images on a compressed format already supported by deno. Maybe deno.gz alongside deno.zip on the servers?

@tendstofortytwo
Copy link

tendstofortytwo commented Oct 9, 2021

I'm currently using Ubuntu 21.04 and had this issue. Had unzip installed, but the issue was that I had installed deno from the snap package, not the shell script. snap refresh deno didn't bring me up to date, but removing the snap and installing deno from the shell script fixed it for me. As a test, I manually downloaded deno 1.14.2 and was able to deno upgrade to 1.14.3 successfully.

@kerkkoh
Copy link

kerkkoh commented Oct 29, 2021

I can confirm that using the snap package and trying to upgrade it with deno upgrade fails with this error. I was able to fix it by using the shell script installation instead as well.

@darkRaspberry
Copy link
Author

So Thanks for closing this issue. But The thing is unzip was available during upgrade. Just deno was not able to access it.

Anyway I hope this will solve it. Thanks again

@tendstofortytwo
Copy link

It might be a good idea to add a notice for the deno snap specifically pointing out that it can't use the unzip on system and therefore can't be upgraded with this command.

@lucacasonato
Copy link
Member

We do not maintain the Deno snap. cc @Lukewh

@Lukewh
Copy link

Lukewh commented Nov 9, 2021

Snap upgraded to v1.16.0. The auto updated failed, will investigate.

The snap will auto upgrade deno to the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir windows Related to Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.