Closed maurerle closed 1 year ago
Hit the same issue today on a Bookworm system. Automatically fixed with:
root@host:/opt/conda# grep -rlIi '/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix' * | xargs -i@ sed -i 's_/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix__g' @
Same issue on RHEL based systems.
Same issue on Opensuse Tumbleweed.
same issue on Ubuntu 20.04
Hit the same issue today on a Bookworm system. Automatically fixed with:
root@host:/opt/conda# grep -rlIi '/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix' * | xargs -i@ sed -i 's_/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix__g' @
Did not work for me, now the conda command just fails with the following message:
bash: /opt/conda/bin/conda: /opt/conda/bin/conda: bad interpreter: Too many levels of symbolic links
Could you explain what this is supposed to do @d-vogel ?
I tested again and it works for me. Be sure to exit the shell and rejoin (ie, close/re-open your terminal if you're working locally). If you don't it won't work (although not the error you cited...).
Here is a tear-down: in the install dir from conda:
root@host:/opt/conda#
find all occurrences from this broken path (someone messed the build script of the package with the wrong variable, referring the build location relative to the local root rather then the package root. However I could not fine the packaging script, and don't know enough about debian packaging to fix it myself):
grep -rlIi '/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix' *
take each filename from the result:
xargs -i@
remove the problematic string. (typically the shebang was: #!/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix/opt/conda/bin/conda
but should be #!/opt/conda/bin/conda
):
sed -i 's_/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix__g' @
If you've wrecked the conda install you can sudo apt-get --reinstall install conda
Demo: Right after upgrading conda this is the symtom of the issue:
user@hostname:~$ conda env
-bash: /home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix/opt/conda/bin/conda: No such file or directory
We want to modify files in /opt/conda
, so we need to be root
user@hostname:~$ su
Password:
VERY important, don't forget to move there:
root@hostname:/home/user# cd /opt/conda/
Actually do the modification:
root@hostname:/opt/conda# grep -rlIi '/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix' * | xargs -i@ sed -i 's_/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix__g' @
Back to normal user:
root@hostname:/opt/conda#
exit
Let's try:
user@hostname:~$ conda env
-bash: /home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix/opt/conda/bin/conda: No such file or directory
Still no luck, because the envs variables were brocken (from the start actually, the prompt did not have the (base)
prefix).
So we need to reopen the shell:
(base) user@host:~$ conda env
usage: conda-env [-h] {create,export,list,remove,update,config} ......
This time we see we have the prefix, and conda works.
@maurerle thank you for reporting this issue, and @d-vogel thank you for posting the workaround. We have rebuilt the .deb
and .rpm
package for conda-23.1.0
(latest has build number 2
; look for conda-23.1.0-2
). This rebuild fixes the shebang issue.
Please let us know if you have any other questions or concerns. Thanks again.
@pseudoyim thank you, the new package works well. I indeed still have two questions: Can the source of the packaging be published as well? Why is there no up to date version of conda available in the deb/rpm?
Checklist
Impacted product
What happened?
I did
sudo apt update && sudo apt upgrade
and installed the latest version of conda through the conda-rpm-deb repository listed here: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.htmlSomehow a lot of files started with a wrong shebang, namely:
#!/home/runner/work/conda-rpm-deb/conda-rpm-deb/conda-prefix/opt/conda/bin/conda
instead of#!/opt/conda/bin/conda
which produced a lot of errors when runningconda
orconda env
.I had to adjust this in
/opt/conda/bin/conda-env
/opt/conda/etc/profile.d/conda.sh
and another two files I did not remember to get conda working again.Additionally, I'd like to mention that the installed 23.1 version is far from the latest conda version available and should also be updated..?
I did not reproduce this issue on a fresh install yet.
Expected behavior or outcome
Installing the latest version should
while
apt changelog conda
shows that 23.1.0-1 has been just released at the 04.08.23, which caused the faulted installation:I am running Gnome and latest Debian 12 Bookworm.
Conda info
Conda config
Conda list
Additional information
No response