Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew cannot download python #34619

Closed
ejmolinelli opened this issue Dec 2, 2014 · 18 comments
Closed

brew cannot download python #34619

ejmolinelli opened this issue Dec 2, 2014 · 18 comments

Comments

@ejmolinelli
Copy link

Hi all,
This is a two parter!

(1)
I've removed macports and am trying to convert to Brew. I've fixed all of the "brew doctor" warnings related to my installation of R as recommended by this post. I've backed up all the tcl and tk files that brew was complaining about, and I upgraded my xcode to 4.6.3 on my mac os 10.7.5.

The only remaining issues from brew doctor are 'unbrewed headers' which I see can be ignored.

I'm trying to run:

brew tap homebrew/dupes
brew install tcl-tk --with-tk

which gives the following error:
==> Installing tcl-tk from homebrew/homebrew-dupes
==> Downloading https://downloads.sourceforge.net/project/tcl/Tcl/8.6.3/tcl8.6.3-src.tar.gz

curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 54
Error: Failed to download resource "tcl-tk"
Download failed: https://downloads.sourceforge.net/project/tcl/Tcl/8.6.3/tcl8.6.3-src.tar.gz

Any thoughts?

(2)
Ultimately, I'm trying to get brew working so i can (re-)install python, which is not working yet. I get the following error with brew install python:

==> Downloading https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
Already downloaded: /Library/Caches/Homebrew/python-2.7.8.tgz
==> Downloading http://bugs.python.org/file30805/issue10910-workaround.txt
Already downloaded: /Library/Caches/Homebrew/python--patch-9926640cb7c8e273e4b451469a2b13d4b9df5ba3.txt
==> Patching
patching file Include/pyport.h
Hunk #1 succeeded at 713 (offset 14 lines).
Hunk #2 succeeded at 736 (offset 14 lines).
Error: integer 4294967294 too big to convert to int' Please report this bug: http://git.io/brew-troubleshooting /usr/local/Library/Homebrew/extend/pathname.rb:123:inatomic_write'
/usr/local/Library/Homebrew/utils/inreplace.rb:26:in inreplace' /usr/local/Library/Homebrew/utils/inreplace.rb:14:ineach'
/usr/local/Library/Homebrew/utils/inreplace.rb:14:in inreplace' /usr/local/Library/Formula/python.rb:110:ininstall'
/usr/local/Library/Homebrew/build.rb:137:in install' /usr/local/Library/Homebrew/formula.rb:282:inbrew'
/usr/local/Library/Homebrew/formula.rb:623:in stage' /usr/local/Library/Homebrew/resource.rb:66:inunpack'
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in mktemp' /usr/local/Library/Homebrew/resource.rb:63:inunpack'
/usr/local/Library/Homebrew/resource.rb:56:in stage' /usr/local/Library/Homebrew/formula.rb:621:instage'
/usr/local/Library/Homebrew/formula.rb:279:in brew' /usr/local/Library/Homebrew/build.rb:117:ininstall'
/usr/local/Library/Homebrew/build.rb:186

@mistydemeo
Copy link
Member

Any thoughts?

Sourceforge is down right now - you won't be able to download any binary or source packages from there until it's resolved.

Error: integer 4294967294 too big to convert to int

Is the number displayed for the following two commands the same as that number?

$ id -A | grep uid
$ ruby -e 'puts Process.uid'

@ejmolinelli
Copy link
Author

YES, indeed. What does that mean? I apologize, i know literally zilch about ruby so I had a hard time tracking this problem.

@ejmolinelli
Copy link
Author

Pardon my dyslexia. In fact, I get different numbers than the integer in the error.

LSKI1360:~ molinele$ id -A | grep uid
auid=479962432
LSKI1360:~ molinele$ ruby -e 'puts Process.uid'
479962432

whereas the integer failure in the brew command is 4294967294

@ejmolinelli
Copy link
Author

Is there anything else I can try?

@mistydemeo
Copy link
Member

There are a few issues around suggesting that Ruby has historically had issues with unsigned UIDs and very large UIDs, e.g. https://www.ruby-forum.com/topic/176989

The UID for the account running Homebrew appears to be affected.

Just to check, are you running Homebrew sudoed as another user? The UID you're showing appears to be the standard one for the nobody user, which is -2 as a signed integer.

@ejmolinelli
Copy link
Author

I am not running sudoed. I thought part of the advantage of using homebrew is that it didn't need admin permissions since it was in /usr/local.

The $ whoami command returns the username I expect. Maybe that's not registered with ruby?

I guess this could be a lingering issue from having used macports previously for all of my imports.

@mistydemeo
Copy link
Member

I am not running sudoed. I thought part of the advantage of using homebrew is that it didn't need admin permissions since it was in /usr/local.

Yep, definitely - the standard usecase is not to run under sudo. Given the unusual UID, I wanted to make sure that you were running as your user and not nobody (or another account).

@ejmolinelli
Copy link
Author

yep, i'm running as user. What do you recommend?

@mistydemeo
Copy link
Member

Just one last check, can you run this (with your username) and provide what the output is? Feel free to redact any information you don't want visible, if appropriate.

/usr/bin/ruby -e 'require "etc"; puts Etc.getpwnam("YOUR_USERNAME_HERE")'

@mistydemeo
Copy link
Member

What do you recommend?

I do recommend running as your user!

@ejmolinelli
Copy link
Author

/usr/bin/ruby -e 'require "etc"; puts Etc.getpwnam("molinele")'
#<struct Struct::Passwd name="molinele",  uid=479962432, gid=4294967294, dir="/Users/molinele", shell="/bin/bash", change=0, uclass="", expire=0>

It looks like the gid is the number that is being referenced in the original failure report.

If I'm already running as user, what's the next step?

@mistydemeo
Copy link
Member

Curious, 4294967294 is IIRC usually the nobody group. (It's properly -2.) What do you get for:

/usr/bin/ruby -e 'require "etc"; puts Etc.getpwuid(4294967294)'

@ejmolinelli
Copy link
Author

#<struct Struct::Passwd name="nobody", passwd="*", uid=4294967294, gid=4294967294, gecos="Unprivileged User", dir="/var/empty", shell="/usr/bin/false", change=0, uclass="", expire=0>

@ejmolinelli
Copy link
Author

I guess the gid for my user and the uid for "nobody" are the same. Is there anyway of changing that or correcting for that?

@ejmolinelli
Copy link
Author

It looks like some people with related issues had to wipe their os and reinstall.
http://stackoverflow.com/questions/18020016/homebrew-not-installing , but I'd like to avoid that. Perhaps this issues stems from an initial uninstalling and reinstalling xcode?

@mistydemeo
Copy link
Member

The issue you linked to looks unrelated.

It is possible to change your user's default group (you can do so from the Advanced Options menu in Users & Groups within System Preferences), but I don't know what ramifications that might have, or how it would have gotten this way. The normal default group for a user is staff.

@jacknagel
Copy link
Contributor

Closing as stale. I don't think there's anything Homebrew can act on here.

@riemers
Copy link

riemers commented Sep 16, 2015

Late to the party, but i just experienced the same issue. Changing my groupid in advanced options back to staff id (in my case 20) solved the issue after opening a new terminal after that.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants