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
Miniconda3-latest-Linux-x86_64.sh: 494: [[: not found #10431
Comments
Hi, when I fixed the Installer, and change the md5 in Installer, then I got this:
How can I fix this ? I found the solution. The Installer does not need to be modified. Just use this
|
Hi @aoliong, it looks like the errors are within lines 412-414. Can you show me a snippet that has those line numbers? |
This seems to be an issue in the constructor version that Anaconda uses to build miniconda, which was already fixed in the main repo in https://github.com/conda/constructor/blob/a7ad3d2807129b2cdc596337b5081df1967002d5/constructor/header.sh#L591-L594 |
I've opened an internal ticket to track the fix. |
Any updates on this? This still seems to be a problem with the latest installer:
fails with
Thanks! |
I'm facing the same issue with the py39 installer as-well.
This is a fresh install of ubuntu 22.10. Edit: This issue for me was caused because I was using |
Thanks for the hint! I was initially trying the |
I ran into this issue today as well, thank you all for the suggestion of running under Perhaps the shebang at the top of the script, should be changed? |
related conda/constructor#596 |
This is more pressing now that focal is shipping a sh that doesn't understand this bash-ism |
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyangfb.com> ghstack-source-id: 38cc3d169355f973974fac918ba6c18808454227 Pull Request resolved: #91371
I also just hit this in Invoking the |
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: #91371 Approved by: https://github.com/albanD
…rict POSIX sh" See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyangfb.com> [ghstack-poisoned]
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyangfb.com> [ghstack-poisoned]
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyangfb.com> ghstack-source-id: 9a39ea1c200e633cc96a1cd12867cc4d835e4b97 Pull Request resolved: #91371
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: #91371 Approved by: https://github.com/albanD
Thanks for your quick reaction and fix despite the fact that I have re-used an old issue in the wrong repo (for me it wasn't clear where to report it and this one was still open) :-) |
Thanks. When will the fix go live ? |
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
Is it expected that this will ultimately be fixed in release distribution ? |
Fixes the issue caused by conda/conda#10431 by including mithro/make-env#31 Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
See also conda/conda#10431 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: pytorch#91371 Approved by: https://github.com/albanD
The Minconda installer seems to expect that `[[` can be used in all sh implementations, which is not necessarily the case (there are some discussions around this issue e.g. in conda/conda#10431). To attempt to work around this, we run the installer with bash instead.
Remember to restart. (I'm running WSL 2 and was able to install it by)
|
seems to still be unfixed as of 2023-01-20, and the
yields
|
you have to call |
@dbast that actually worked! thanks! btw i'm positive there is a bug in the current Miniconda3-latest-Linux-x86_64.sh where it uses |
@divinity76 You are a hero. |
Current Behavior
After being prompted to run
conda init
, The miniconda installer exits with the error[[: not found
, and then continues installing:Steps to Reproduce
/bin/sh
to a shell outsidebash
-- Debian, for example. links it todash
.chmod +x Miniconda3-latest-Linux-x86_64.sh && ./Miniconda3-latest-Linux-x86_64.sh
orsh Miniconda3-latest-Linux-x86_64.sh
conda init
, answeryes
.Steps to Fix
It looks like the issue with the command is in the Installer:
[[
, as a bash extension, is not necessarily available for all POSIX shells (as the hashbang#!/bin/sh
implies). There are two solutions here:(Preferred) Replace
[[
with acase
Explicitly mark the installer as a bash script:
Replace the hashbang on line 1:
In theory this solution is easy enough for me to make a pull request instead, but I couldn't for the life of me figure out how the installer is built.
ack
ing for the code snippet in this repo shows nothing for me, and being completely new to conda, I don't know which repo out of the 37 in this GitHub organization contains the script that builds the installer. If I could find a pointer to where it is, I'd be happy to set up the pull request.The text was updated successfully, but these errors were encountered: