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

unzip not found on PATH on Ubuntu 22.04 when using 'deno compile', although unzip has been installed and can be executed on command line #23988

Closed
flo-jan opened this issue May 26, 2024 · 11 comments · Fixed by #24926
Labels
needs investigation requires further investigation before determining if it is an issue or not

Comments

@flo-jan
Copy link

flo-jan commented May 26, 2024

deno 1.43.6 (release, x86_64-unknown-linux-gnu)
Ubuntu 22.04

When I give the command 'deno compile' it gives the error: "unzip was not found in your PATH, please install unzip".

But unzip is installed. I can use unzip commands in the same terminal as where I try to execute the deno compile command.

Could this be a bug?

@jerome-benoit
Copy link
Contributor

jerome-benoit commented May 26, 2024

Outputs of

echo $PATH
echo $SHELL
which unzip

@flo-jan
Copy link
Author

flo-jan commented May 27, 2024

output of echo $SHELL is '/bin/bash'

other outputs can be seen in screenshot:
deno and unzip

@lucacasonato lucacasonato added the needs investigation requires further investigation before determining if it is an issue or not label Jun 7, 2024
@littledivy
Copy link
Member

Maybe the temp directory Deno created got deleted before unzip was called. @flo-jan Do you have any background service that deletes /tmp/?

The error message can be improved.

@flo-jan
Copy link
Author

flo-jan commented Jun 8, 2024

Deno runs as Snap application.

There is a /tmp/snap-private-tmp/snap.deno/tmp/ folder. It is empty and remains empty after running deno compile, but I can see something happens with it, because the modified date of that folder updates each time I run deno compile.

@flo-jan
Copy link
Author

flo-jan commented Jun 8, 2024

I would be interested if someone is able to reproduce this issue

@flo-jan
Copy link
Author

flo-jan commented Jun 10, 2024

I tried another way of installing deno, not with Snap but with this command:
curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh

I still encounter the same problem when trying to run deno compile but with a different error message:

Archive:  /tmp/.tmpPoaYid/denort.zip
  inflating: denort                  
error: Writing write

Caused by:
    No such file or directory (os error 2)

I checked the /tmp folder. I can create folders and files in it and they are not removed automatically.

I also tried another laptop with Ubuntu 22.04 installed and on that laptop deno compile works without problems.

@jerome-benoit
Copy link
Contributor

jerome-benoit commented Jun 10, 2024

Since an Ubuntu clean install of the same version does not trigger any issues, it looks more like an issue with the OS and/or the user env setup.

@flo-jan
Copy link
Author

flo-jan commented Jun 10, 2024

Deno.makeTempFile() works correctlty however, on the same computer

@flo-jan
Copy link
Author

flo-jan commented Jun 10, 2024

it creates files in the /tmp folder

@flo-jan
Copy link
Author

flo-jan commented Jun 10, 2024

It would be helpful if would know the exact location in deno's source code where this

Archive:  /tmp/.tmpPoaYid/denort.zip
  inflating: denort                  
error: Writing write

Caused by:
    No such file or directory (os error 2)

happens. Could someone point me to that?

@sakars
Copy link

sakars commented Jul 4, 2024

I seem to be having a similar issue, unzip is located in PATH and at least the help page is displayed for it from the terminal, but deno compile fails. I will note that I am launching this from a VirtualBox VM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation requires further investigation before determining if it is an issue or not
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants