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

brew install htop does not work #10355

Closed
landon9720 opened this issue Feb 21, 2012 · 23 comments
Closed

brew install htop does not work #10355

landon9720 opened this issue Feb 21, 2012 · 23 comments

Comments

@landon9720
Copy link

brew install htop
Error: No available formula for htop

Various online sources site the "htop" formula which appears to be missing.

@adamv
Copy link
Contributor

adamv commented Feb 21, 2012

htop was removed from Homebrew because it was a seemingly non-maintained unofficial fork.

@landon9720
Copy link
Author

Thank you. At least now we have a record of this.

@Sharpie
Copy link
Contributor

Sharpie commented Feb 21, 2012

htop was shipped off to Homebrew-alt in b99d68b.

@Sharpie Sharpie closed this as completed Feb 21, 2012
@landon9720
Copy link
Author

To install from homebrew-alt:

brew install --HEAD https://raw.github.com/adamv/homebrew-alt/master/unmaintained/htop.rb

@bric3
Copy link
Contributor

bric3 commented Feb 24, 2012

@landon9720 thx, however it didn't work ; autogen is failing to build htop. I don't really know how to fix that.
By the way I'm using Xcode 4.3, that might be the issue here. As automake / automake are not anymore part of the system according to a comment in this gist https://gist.github.com/1860902

######################################################################## 100,0%
==> Cloning https://github.com/cynthia/htop-osx.git
Updating /Users/brice/Library/Caches/Homebrew/htop--git
==> ./autogen.sh
./autogen.sh: line 3: aclocal: command not found
./autogen.sh: line 4: autoconf: command not found
./autogen.sh: line 5: autoheader: command not found
./autogen.sh: line 6: glibtoolize: command not found
./autogen.sh: line 7: automake: command not found
==> Exit Status: 127
http://github.com/mxcl/homebrew/blob/master/Library/Formula/.rb#L
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 87d31f09f7f5d13b4e572e6e98ecaa095fb879fa
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11 installed? true
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl:   /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby:   /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby
==> Build Flags
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j2

Error: Failed executing: ./autogen.sh 
If 'brew doctor' does not help diagnose the issue, please report the bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue

@landon9720
Copy link
Author

Brice, I have the same problem. I only installed the Xcode command line tools, which do not appear to include autoconf. If somebody knows how to install autoconf that information would be appreciated.

On Feb 24, 2012, at 5:15 AM, Brice Dutheil wrote:

@landon9720 thx, however it didn't work ; autogen is failing to build htop. I don't really know how to fix that.

######################################################################## 100,0%
==> Cloning https://github.com/cynthia/htop-osx.git
Updating /Users/brice/Library/Caches/Homebrew/htop--git
==> ./autogen.sh
./autogen.sh: line 3: aclocal: command not found
./autogen.sh: line 4: autoconf: command not found
./autogen.sh: line 5: autoheader: command not found
./autogen.sh: line 6: glibtoolize: command not found
./autogen.sh: line 7: automake: command not found
==> Exit Status: 127
http://github.com/mxcl/homebrew/blob/master/Library/Formula/.rb#L
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 87d31f09f7f5d13b4e572e6e98ecaa095fb879fa
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11 installed? true
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl:   /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby:   /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby
==> Build Flags
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j2

Error: Failed executing: ./autogen.sh 
If 'brew doctor' does not help diagnose the issue, please report the bug:
   https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue

Reply to this email directly or view it on GitHub:
#10355 (comment)

@grouver
Copy link

grouver commented Feb 29, 2012

xcode 4.3. no longer has autotools which is why htop does not build. You will have to install a few other things before htop builds from that brew script. Alternatively someone can amend the scrip if they'd like to

brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/autoconf.rb
brew link autoconf
brew install automake

after installing autoconf and automake you should be able to compile htop (if not add libtool).

I have no idea why Apple though that autoconf and automake are not needed but at least you still have a way around the issue. Oh and Homebrew should really bring autoconf back to the main branch.

@ahmetb
Copy link

ahmetb commented Mar 10, 2012

I applied @grouver 's instructions and then tried brew install --HEAD https://raw.github.com/adamv/homebrew-alt/master/unmaintained/htop.rb and installed successfully. However, without root privileges, it cannot show stats from processes other than itself (everything is just 0). Running with sudo privileges fix that but what may cause this?

@grouver
Copy link

grouver commented Mar 12, 2012

@ahmetalpbalkan this is not a problem with homebrew as I can guarantee that htop works just fine without having to sudo if you have setup homebrew in the standard and recommended location.

Sorry, but it would be impossible for someone to help you given the limited amount of information that you have posted about the setting you used for homebrew and your system. Also, if you are using a custom location for homebrew I would strongly urge you to think really hard why it is that you need that. It makes troubleshooting a nightmare at times and it's simply not worth the hassle in most cases.

@ahmetb
Copy link

ahmetb commented Mar 12, 2012

@grouver I didn't say that I installed homebrew somewhere else, it is in default location, this bug disappeared after reboot.

@grouver
Copy link

grouver commented Mar 12, 2012

@ahmetalpbalkan sorry, for assuming stuff. I've had to troubleshoot insane configurations before so I jumped the gun there. Anyway glad your problem is resolved. It is rather odd that you had to restart the computer and I don't remember having to do that ...

@tpak
Copy link

tpak commented Apr 3, 2012

Looks like autoconf is now back in the main branch? The above did not work for me but this did:

brew install autoconf
brew link autoconf
brew install automake
brew install --HEAD https://raw.github.com/adamv/homebrew-alt/master/unmaintained/htop.rb

... received some warnings that htop needed sudo privs to get at all the process info and followed these instructions:

cd /usr/local/Cellar/htop/HEAD/bin
chmod 6555 htop
sudo chown root htop
htop

and all is well in the world again

@Andrewpk
Copy link

You might also want to check if you have procfs enabled. Htop is procfs dependent, and my clean install of lion did not come with /proc mounted nor did it come with procfs or 'mount_linprocfs' -- so ymmv still.
FreeBSD has gotten rid of procfs in exchange for standardizing sysctl, but at least most BSD's still include procfs as a mountable filesystem, or the mounting binary 'mount_linprocfs'.

We might be able to get around this issue by installing http://osxfuse.github.com/ and creating a procfs mount, but I have yet to test that.

@grouver
Copy link

grouver commented Apr 13, 2012

@Andrewpk I am not clamming to have a detailed knowledge of what Apple has removed from Lion but I know for a fact that after a fresh install of Lion (clean hdd without recovering any preference files etc.) htop installed just fine with brew and it runs without me having to do anything. It is possible that the installation process checks and installs missing components but I didn't really pay attention to that. So the removal of procfs is likely not the reason why htop fails to build.
Also I don't have /proc mounted at the moment and htop works perfectly fine for me but again I'm not clamming that you're wrong just stating facts on my side.

@Andrewpk
Copy link

@grouver Hrm, even the package they threw in freebsd requires procfs -- http://www.freebsdsoftware.org/sysutils/htop.html/ - "requires linprocfs"
I know when building htop on my new mba, there were a few other caveats, but after I had it compiling it would still produce an error complaining about a lack of /proc
I'll try again later and add a more tangible comment - my main point of this is that since freebsd & lion are moving away from procfs entirely, htop might never have a maintainer since (unless the htop dev rewrites it) it does not support what the bsd's are moving toward to replace procfs - sysctl.

@grouver
Copy link

grouver commented Apr 13, 2012

@Andrewpk well I just checked again and I have no procfs mounted and also /proc does not exist yet htop runs without any errors and it does show all processes and from what I can tell works as expected.

The only reasonable explanation that I can come up with is that recent versions are patched so that they no longer need procfs when running on OS X (and possibly FreeBSD).
What I have installed and running is
htop 0.8.2.1

@Andrewpk
Copy link

@grouver - the errors I was getting were from compiling htop from source at the current stable release (1.something now) after I had some initial errors with brew's htop. Whatever I did to get htop 'live' compiling to the point it was complaining about a lack of /proc along with the autoconf && automake additions allowed me to finally get htop via brew installed.

I was right about htop requiring procfs --- but it looks like the version of htop that brew is pointing to has had some work done on it in order for it to run under os x.
And @grouver was right about it working - as it does!

@max-horvath
Copy link
Contributor

I opened pull request #11727 to re-add htop to homebrew.

Includes latest patches for version 0.8.2.1 ... compiles fine on Lion ... does not crash.

@markalanevans
Copy link

Anyone have this working on SnowLeopard?

@Andrewpk
Copy link

@markalanevans - yes - if you have troubles make sure you try each suggestion in this thread.

@alletti
Copy link

alletti commented Apr 27, 2012

Hi, what's the current status on this? The url for homebrew-alt doesn't seem to work any more, and I can't find the htop formula anywhere.

@mistydemeo
Copy link
Member

@alletti Please don't comment on older closed issues - thanks.

As you can see above, there's a pull request for resubmitting it. It was also recently moved from homebrew-alt to the boneyard, and you can install from there by doing brew tap homebrew/boneyard; brew install homebrew/boneyard/htop

@alletti
Copy link

alletti commented Apr 28, 2012

Thanks. Searches on htop for Lion tend to bring to this page, but I couldn't find any up to date information on the current wereabouts of the formula.
Apologies for bumping an old thread.

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

No branches or pull requests