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

bunzip2: command not found #8182

Closed
lambdaq opened this issue Jan 18, 2018 · 17 comments
Closed

bunzip2: command not found #8182

lambdaq opened this issue Jan 18, 2018 · 17 comments
Assignees

Comments

@lambdaq
Copy link

lambdaq commented Jan 18, 2018

Actual Behavior

Miniconda2-latest-Linux-x86_64.sh fails to install

bunzip2: command not found

Expected Behavior

We could install regardless of bunzip2 utillity

Steps to Reproduce

  1. download https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
  2. chmod 755 Miniconda2-latest-Linux-x86_64.sh && ./Miniconda2-latest-Linux-x86_64.sh
Anaconda or Miniconda version:

miniconda2-latest

Operating System:

Centos7

suggestion:

CentOS7 does not have bunzip2 utility pre-installed. And many of our linux accounts does not have limited or no sudo capability.

But since Python has a built-in https://docs.python.org/2/library/bz2.html library, can we use this library to substitute the bunzip2 command just in case?

example script:

#!/usr/bin/env python
import bz2, sys
print bz2.BZ2File(sys.argv[2]).read()

Save the script as bunzip2, place it under some dir in your $PATH, and the setup can be done smoothly.

@msarahan
Copy link
Contributor

At the point that we run the installer, python itself exists within a bzip2 archive. We can't assume that system python is available for us to use.

I think the next best thing is to bundle a self-contained bunzip2 executable in the installer, and always use that.

@lambdaq
Copy link
Author

lambdaq commented Jan 18, 2018

@msarahan Most Linux systems have Python pre-installed. We can cover more distros with low cost, just few lines of code.

@msarahan
Copy link
Contributor

Really? I would expect bunzip2 to be more omnipresent than python. Regardless, we need to gather evidence to guide any decision on this matter. Assuming anything about the host system is what got us into hot water in the first place. If a standalone fix is viable, it is preferable to anything that depends on the system in any way.

@jonnyhtw
Copy link

jonnyhtw commented Feb 9, 2018

I'm getting this error when trying to install miniconda on google cloud platform FYI.

Cheers

@msarahan
Copy link
Contributor

msarahan commented Feb 9, 2018

We are too deep into our release cycle for the Anaconda 5.1 release to fix this now. We have added it to our 5.2 release milestone. Miniconda installers may have this fix sooner.

@lambdaq
Copy link
Author

lambdaq commented Feb 27, 2018

@msarahan just a side note, bz2 is inefficient in both compression speed and ratio. Maybe in later versions we can use xz instead of bz2.

@harryscholes
Copy link

@jonnyhtw I got it working by first running sudo apt-get install bzip2 btw

@jonnyhtw
Copy link

jonnyhtw commented May 3, 2018

Thanks @harryscholes

I'll have a look at that...

Jonny

@sdanielzafar
Copy link

I had the same issue and was able to install normally after installing bzip2 as @harryscholes mentioned.

@mnnit-geek
Copy link

For centos, yum install bzip2 works just as fine!

@mingwandroid mingwandroid self-assigned this May 20, 2018
@ryancat
Copy link

ryancat commented May 29, 2018

sudo apt-get install bzip2 works for me too! Thanks!

@kbrose
Copy link

kbrose commented Oct 17, 2018

Seems to still be a problem on 5.3.0

@msf1t
Copy link

msf1t commented Oct 17, 2018

Still requires bunzip2...

@missingdaysqxy
Copy link

Actual Behavior

Miniconda2-latest-Linux-x86_64.sh fails to install

bunzip2: command not found

Expected Behavior

We could install regardless of bunzip2 utillity

Steps to Reproduce

  1. download https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
  2. chmod 755 Miniconda2-latest-Linux-x86_64.sh && ./Miniconda2-latest-Linux-x86_64.sh
Anaconda or Miniconda version:

miniconda2-latest

Operating System:

Centos7

suggestion:

CentOS7 does not have bunzip2 utility pre-installed. And many of our linux accounts does not have limited or no sudo capability.

But since Python has a built-in https://docs.python.org/2/library/bz2.html library, can we use this library to substitute the bunzip2 command just in case?

example script:

#!/usr/bin/env python
import bz2, sys
print bz2.BZ2File(sys.argv[2]).read()

Save the script as bunzip2, place it under some dir in your $PATH, and the setup can be done smoothly.

wonderful idea. I solved my problem when I install anaconda in server. Mark this~~

@norru
Copy link

norru commented Mar 11, 2019

Ubuntu 18.04.2, bzip2 package is INSTALLED and I have bunzip2 in the path.

$ pyenv install anaconda2-2018.12
Installing Anaconda2-2018.12-Linux-x86_64.sh...

BUILD FAILED (Ubuntu 18.04 using python-build 1.2.9-19-g7d02b246)

Inspect or clean up the working tree at /tmp/python-build.20190311105339.428
Results logged to /tmp/python-build.20190311105339.428.log

Last 10 log lines:
/tmp/python-build.20190311105339.428 ~/Projects/ivt/parallax_testbed/scripts
/tmp/python-build.20190311105339.428/Anaconda2-2018.12-Linux-x86_64.sh /tmp/python-build.20190311105339.428 ~/Projects/ivt/parallax_testbed/scripts
WARNING: bzip2 does not appear to be installed this may cause problems below
PREFIX=/home/norru/.pyenv/versions/anaconda2-2018.12
pyenv: bunzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

I've found the following workaround:

export PATH=/bin:$PATH
pyenv install anaconda2-2018.12

@fmeum
Copy link

fmeum commented Apr 30, 2020

Since jitpack.io does not have bunzip2 installed on their build servers, projects using miniconda can't build there. It would be great if this dependency could be removed.

@mingwandroid
Copy link

This has been fixed for a long time now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests