GithubHelp home page GithubHelp logo

curses dependency? about mctop HOT 6 CLOSED

konklone avatar konklone commented on July 3, 2024
curses dependency?

from mctop.

Comments (6)

kgust avatar kgust commented on July 3, 2024

I'm also seeing this. I tried to get around this with gem install ncurses but no joy. I'm stuck in the same place.

from mctop.

ickymettle avatar ickymettle commented on July 3, 2024

Hi Guys,

the curses module is part of the ruby standard library so shouldn't require any additional gems. I've only tested under 1.9.3 and 1.8.7. What verson of ruby are you running?

If you fire up irb can you do a:

require 'curses'

Does that fail?

Cheers,
Marcus

from mctop.

konklone avatar konklone commented on July 3, 2024

I'm running Ruby 1.9.3, and this does fail:

()[~] ➔ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
()[~] ➔ irb
irb(main):001:0> require 'curses'
LoadError: cannot load such file -- curses
    from /home/eric/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/eric/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from (irb):1
    from /home/eric/.rvm/rubies/ruby-1.9.3-p327/bin/irb:12:in `<main>'
irb(main):002:0> 

Installing the ncurses gem leads to this (at the end - skipping a long list of make instructions and warnings):

In file included from form_wrap.h:26:0,
                 from form_wrap.c:28:
/usr/include/form.h:403:28: note: expected ‘const char *’ but argument is of type ‘int’
form_wrap.c: In function ‘make_arg’:
form_wrap.c:1126:38: error: ‘struct RArray’ has no member named ‘len’
form_wrap.c:1130:5: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [form_wrap.o] Error 1


Gem files will remain installed in /home/eric/.rvm/gems/ruby-1.9.3-p327/gems/ncurses-0.9.1 for inspection.
Results logged to /home/eric/.rvm/gems/ruby-1.9.3-p327/gems/ncurses-0.9.1/./gem_make.out

I'm on Ubuntu 12.10, using rvm.

from mctop.

kgust avatar kgust commented on July 3, 2024

I'm running Linux Mint 14 (which is a deriviative of Ubuntu 12.10).

$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

$ irb
Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
You may follow 'rvm notes' for dependencies and/or read the docs page https://rvm.io/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.
cannot load such file -- irbtools
1.9.3p327 :001 > require 'curses'
LoadError: cannot load such file -- curses
from /home/kgustavson/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/kgustavson/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from (irb):1
from /home/kgustavson/.rvm/rubies/ruby-1.9.3-p327/bin/irb:16:in `

'
1.9.3p327 :002 >

$ /usr/bin/irb
irb(main):001:0>

Looks like rvm might have a problem. I installed ruby 1.8 and support files then ran...

sudo /usr/bin/ruby1.8 bin/mctop -i eth0

Then it finally came up. It still won't run in system 1.9.3, it can't find pcap.

from mctop.

ickymettle avatar ickymettle commented on July 3, 2024

I looks a little like something wacky with rvm. I've tested in a couple places now. On my Mac with Ruby installed from homebrew:

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.1.0]
$ irb
irb(main):001:0> require 'curses' 
=> true

And i've been using rbenv for testing other Ruby versions, I installed 1.9.3p327 and no problems either:

$ ruby --version
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
$ irb
irb(main):001:0> require 'curses'  
=> true

You'll need to ensure under each version of ruby you're running it against that you've got the ruby-pcap gem installed. It's a native extension so requires libpcap-devel to be available at gem install time.

Hope that helps.

from mctop.

ickymettle avatar ickymettle commented on July 3, 2024

No further action here ... closing this one

from mctop.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.