Linuxbrew unable to update, install python #471

alexanderwhatley opened this Issue Jun 3, 2016 · 35 comments


None yet

9 participants


When I try to install python3 with linuxbrew, I get the following error message:

alex@ALEXANDERPC:/mnt/c/users/Alexander/Downloads$ brew install python3
Error: Unsupported special dependency :perl
Please report this bug:
/home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:123:in parse_symbol_spec' /home/alex/.linuxbrew/Library/Homebrew/compat/dependency_collector.rb:17:inparse_symbol_spec'
/home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:73:in parse_spec' /home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:61:inbuild'
/home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in block in fetch' /home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:infetch'
/home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in fetch' /home/alex/.linuxbrew/Library/Homebrew/dependency_collector.rb:38:inadd'
/home/alex/.linuxbrew/Library/Homebrew/software_spec.rb:155:in depends_on' /home/alex/.linuxbrew/Library/Homebrew/formula.rb:1862:inblock in depends_on'
/home/alex/.linuxbrew/Library/Homebrew/formula.rb:1862:in each' /home/alex/.linuxbrew/Library/Homebrew/formula.rb:1862:independs_on'
/home/alex/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:33:in <class:Openssl>' /home/alex/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:1:inload_formula'
/home/alex/.linuxbrew/Library/Homebrew/formulary.rb:21:in module_eval' /home/alex/.linuxbrew/Library/Homebrew/formulary.rb:21:inload_formula'
/home/alex/.linuxbrew/Library/Homebrew/formulary.rb:34:in load_formula_from_path' /home/alex/.linuxbrew/Library/Homebrew/formulary.rb:83:inload_file'
/home/alex/.linuxbrew/Library/Homebrew/formulary.rb:74:in klass' /home/alex/.linuxbrew/Library/Homebrew/formulary.rb:70:inget_formula'
/home/alex/.linuxbrew/Library/Homebrew/formulary.rb:207:in factory' /home/alex/.linuxbrew/Library/Homebrew/dependency.rb:32:into_formula'
/home/alex/.linuxbrew/Library/Homebrew/dependency.rb:93:in block in expand' /home/alex/.linuxbrew/Library/Homebrew/dependencies.rb:9:ineach'
/home/alex/.linuxbrew/Library/Homebrew/dependencies.rb:9:in each' /home/alex/.linuxbrew/Library/Homebrew/dependency.rb:80:inexpand'
/home/alex/.linuxbrew/Library/Homebrew/formula.rb:1223:in recursive_dependencies' /home/alex/.linuxbrew/Library/Homebrew/requirement.rb:196:inexpand'
/home/alex/.linuxbrew/Library/Homebrew/formula.rb:1229:in recursive_requirements' /home/alex/.linuxbrew/Library/Homebrew/formula_installer.rb:313:inexpand_requirements'
/home/alex/.linuxbrew/Library/Homebrew/formula_installer.rb:263:in compute_dependencies' /home/alex/.linuxbrew/Library/Homebrew/formula_installer.rb:130:inverify_deps_exist'
/home/alex/.linuxbrew/Library/Homebrew/formula_installer.rb:123:in prelude' /home/alex/.linuxbrew/Library/Homebrew/cmd/install.rb:231:ininstall_formula'
/home/alex/.linuxbrew/Library/Homebrew/cmd/install.rb:93:in block in install' /home/alex/.linuxbrew/Library/Homebrew/cmd/install.rb:93:ineach'
/home/alex/.linuxbrew/Library/Homebrew/cmd/install.rb:93:in install' /home/alex/.linuxbrew/Library/brew.rb:84:in


When I try to update linuxbrew, I get the following error:

alex@ALEXANDERPC:/mnt/c/users/Alexander/Downloads$ brew update
Initialized empty Git repository in /home/alex/.linuxbrew/.git/
remote: Counting objects: 478, done.
remote: Compressing objects: 100% (434/434), done.
remote: Total 478 (delta 27), reused 320 (delta 17), pack-reused 0
Receiving objects: 100% (478/478), 772.50 KiB | 1.47 MiB/s, done.
Resolving deltas: 100% (27/27), done.

  • [new branch] master -> origin/master
    fatal: cannot rmdir 'Library/Formula': Directory not empty

Any help?


Also, when I close and reopen the program, even though I added and exported the path for brew, it is no longer on the path.....


Thanks for reporting the issue. Can you please share out the steps you used to install linuxbrew so we can try to repro locally?

alexanderwhatley commented Jun 7, 2016 edited

Sure - I just installed ruby (sudo apt-get install ruby I believe?) and ran the command "ruby -e "$(curl -fsSL""


Thanks, I was able to repro the error on WSL but I was also able to repro the error on native Ubuntu 14.04. I'm not familiar enough with homebrew to know what's wrong but it appears to be a configuration issue. Can you please confirm?


Sorry, how would I confirm that?


Sorry, I should have been more clear :). Have you tried the steps above on native Linux, preferably Ubuntu 14.04 to match WSL? Since it didn't work for me on native Ubuntu 14.04 I'm assuming there's a missing configuration step but wanted to check if you had this working on native Linux.


Unfortunately, I don't have Linux setup on my computer at the moment, so I don't think I can help with that.

@stehufntdev stehufntdev removed the need-repro label Jun 7, 2016

No worries, just wanted to double check. Searching for the failure message above I found a related failure that described running brew update first - #471 (comment). That seemed to resolve the failure on both native Ubuntu and WSL.

Closing this out for now, but please let us know if you hit other issues unique to WSL.

@stehufntdev stehufntdev closed this Jun 7, 2016

Thanks. Brew began to download the requirements for python3, but then crashed once it began to install openssl:

alex@ALEXANDERPC:~$ brew install python3
==> Installing dependencies for python3: openssl, bzip2
==> Installing python3 dependency: openssl
==> Downloading
Already downloaded: /home/alex/.cache/Homebrew/openssl-1.0.2h.tar.gz
==> perl ./Configure --prefix=/home/alex/.linuxbrew/Cellar/openssl/1.0.2h --openssldir=/home/alex/.linuxbrew/etc/openssl no-ssl2 zlib-dynamic shared enable-cms -isystem/home/alex/.linuxbrew/include -Os -w -pipe -march=native -L/home/alex/.linuxbrew/lib -Wl,--dynamic-li
==> make depend
==> make
==> make test
Last 15 lines from /home/alex/.cache/Homebrew/Logs/openssl/04.make:

make[1]: Entering directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h/test'
make[2]: Entering directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h'
making all in apps...
make[3]: Entering directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h/apps'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h/apps'
make[2]: Leaving directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h'
../util/ ./destest
ERROR: object '../util/../' from LD_PRELOAD cannot be preloaded (cannot enable executable stack as shared object requires): ignored.
./destest: error while loading shared libraries: cannot enable executable stack as shared object requires: Invalid argument
make[1]: *** [test_des] Error 127
make[1]: Leaving directory `/tmp/openssl-20160607-5619-1kgsj4k/openssl-1.0.2h/test'
make: *** [tests] Error 2

If reporting this issue please do so at (not Homebrew/brew):

Apparently, this issue has already been reported as well: Linuxbrew/homebrew-core#292


Thanks for the follow-up. The "cannot enable executable stack" failure is discussed in #286. The workaround in there may work depending on's requirements.

JMoVS commented Aug 16, 2016

I stumbled into the same issue. In general, binaries aren't executed that are patched with patchelf, and all the bottles (precompiled binaries from brew) are this way. So to use linuxbrew, you currently should set it to always compile from source.
You can get openssl to compile if you start with all packages self-compiled (packages like bzip2 and xz have to be compiled on the machine because they otherwise silently fail), but you have to disable tests. See Linuxbrew/homebrew-core#761 and issues referenced in that for further discussion/info.


So to use linuxbrew, you currently should set it to always compile from source.

echo 'export HOMEBREW_BUILD_FROM_SOURCE=1' >>~/.bash_profile


JMoVS commented Nov 23, 2016

@sjackman have you checked that bash_profile is correct? If I remember correctly, out of the box, windows just looks at .bashrc and not cares about .bash_profile, therefore the exports not working...

sjackman commented Nov 23, 2016 edited

I don't unfortunately have access to a Windows machine with which to test. If you can confirm, please correct the Wiki. It's world-writable. Thanks for the clarification.

@stehufntdev stehufntdev reopened this Nov 30, 2016

On current builds, there's an execv issue for running brew test that needs to be investigated related to patch elf binaries. Here are the repro steps:

To reproduce the issue, install Linuxbrew (instructions at and run

brew install hello
brew test hello


As far as I can tell, the Windows kernel is unable to load ELF executables that have been modified using patchelf.


Thanks @sjackman, I got the repro under a debugger and confirmed it is an issue with the lxcore driver parsing the elf binary. I filed a task on our side to investigate further and will report back with any updates.

@stehufntdev stehufntdev added the bug label Dec 1, 2016
sjackman commented Dec 1, 2016

@stehufntdev That's great news. Thanks for the update.


After updating the elf parsing logic in the lxcore driver, I was able to run brew test hello. The fix should be out in an insider build soon.

sjackman commented Dec 6, 2016 edited

That's very exciting! Thanks! I don't follow the releases closely. Are you able to ping me (tag me) when it's released at such a stage that user's will see the fix? When is that expected?


Yes, when the fix reaches insider builds the fixinbound tag should be moved to fixed.

sjackman commented Dec 6, 2016

Is that the point (insider builds) when end users will see the fix?


Yes, when the fix reaches insider builds the fixinbound tag should be moved to fixed.


That OpenSSL's libcrypto compiles with execstack is a bit shocking. As far back as 2005 this is being discussed ( and back in 2007 -Wa,--noexecstack was added to OpenSSL build recipes, see

I'm still thinking that changing the assembler directly is much nicer. I get the portability concerns, that's where checking for elf and target os comes in.

@sjackman sjackman referenced this issue in Linuxbrew/homebrew-core Jan 7, 2017

openssl: fix issues with build #1510

yorickdowne commented Jan 10, 2017 edited

@sjackman The patchelf issue has been resolved in build 15002. brew test hello now succeeds:

tbehrens@WSL-Insider-Test:~$ brew test hello
Testing hello
==> /home/tbehrens/.linuxbrew/Cellar/hello/2.10/bin/hello --greeting=brew
tbehrens@WSL-Insider-Test:~$ /home/tbehrens/.linuxbrew/Cellar/hello/2.10/bin/hello --greeting=brew

Was that supposed to run the hello binary automatically, though?

sjackman commented Jan 10, 2017 edited

It did run hello, but the output is suppressed. Try brew test hello -v

The patchelf issue has been resolved in build 15002. brew test hello now succeeds:

That's great news! Has this fix made it out to end users? This issue is still tagged as fixinbound rather than fixed.

benhillis commented Jan 10, 2017 edited

@sjackman - Yes this fix was in yesterday'ss Windows Insider build (15002).


🎉🍾 Between this PR and noexecstack for openssl (see Linuxbrew/homebrew-core#1510), it should now be possible to run Linuxbrew on Windows!

sudhirj commented Jan 10, 2017

@benhillis Would one need to be on the 'Fast' track to get it? Or is this already a Release Preview?


Currently this is only in fast ring.


When will it become a "Release Preview"?


I believe "release preview" is specifically for fighting Windows Updates to the current version of Windows. The fast ring and slow ring are for the V-Next versions of Windows. Updates to WSL require new Windows builds so your option is to switch to Insider Slow, Insider Fast, or wait until the next Windows release which is due in April.


@benhillis I want to help test this and Nix integration. Can you give me information to get into Insider Slow or Insider Fast? Preferably by launching a VM.

sjagoe commented Jan 15, 2017

@domenkozar Join here:

Then in your Windows 10 VM, open the Windows Store and log in with your Microsoft account (person icon to the left of the search bar at the top-right). After entering your MS account details you can choose to only sign in to the store rather than altering your whole Windows profile to use MS account.

Finally, open Settings, select Update & Security. Click Advanced Settings at the bottom and finally follow the Get Insider Preview Builds section.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment