LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2015, 03:18 PM   #1
sunbelt57
LQ Newbie
 
Registered: Aug 2013
Location: Wyoming
Posts: 19

Rep: Reputation: Disabled
trying to install ncurses


first I downloaded ncurses-5.9 created a directory, ran ./configure - that seemed to go OK - ran make and got something like:

gcc -O2 --param max-inline-insns-single=1200 -o xmas ../obj_s/xmas.o -Wl,-rpath,/home/dan/dev/ncurses-5.9/lib -I. -I. -I../test -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -I. -I../include -O2 --param max-inline-insns-single=1200 -fPIC `echo "-L../lib -lform -lmenu -lpanel -lncurses " | sed -e 's/-lform.*-lpanel[^ ]*//'` -lutil -lm
make[1]: Leaving directory `/home/dan/dev/ncurses-5.9/test'
cd misc && make DESTDIR="" all
make[1]: Entering directory `/home/dan/dev/ncurses-5.9/misc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/dan/dev/ncurses-5.9/misc'
cd c++ && make DESTDIR="" all
make[1]: Entering directory `/home/dan/dev/ncurses-5.9/c++'
cd ../obj_s; -I../c++ -I../include -I. -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -I. -I../include -fPIC -c ../c++/cursesf.cc
make[1]: Leaving directory `/home/dan/dev/ncurses-5.9/c++'

so then I tried to install libncurses5-dev: it says I already have the latest version

then I tried to install ncurses-dev and it said I already have the latest version.

OK so if its installed shouldn't I be able to go:
echo "^[[0;37;40mIn Color"

and it changes the color?
 
Old 03-08-2015, 08:25 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
You don't need ncurses to display color in Bash.
See this page: https://linuxtidbits.wordpress.com/2...ipts-advanced/
Try:
Code:
echo -e "My favorite color is \033[38;5;148mYellow-Green\033[39m"
If you want to install ncurses, install it using your distribution package manager. There is no need to compile it yourself.

jlinkels
 
Old 03-08-2015, 09:35 PM   #3
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Make sure your terminal supports colors.
 
Old 03-08-2015, 09:46 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Different terminals may have different control sequences for outputting colours.

E.g. terminals: linux, xterm
 
Old 03-09-2015, 07:00 AM   #5
sunbelt57
LQ Newbie
 
Registered: Aug 2013
Location: Wyoming
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jlinkels View Post
You don't need ncurses to display color in Bash.
See this page: https://linuxtidbits.wordpress.com/2...ipts-advanced/
Try:
Code:
echo -e "My favorite color is \033[38;5;148mYellow-Green\033[39m"
If you want to install ncurses, install it using your distribution package manager. There is no need to compile it yourself.

jlinkels
the above code works but the package mgr doesn't have curses. Besides, I want to compile some of the sample programs. I tried worm and it couldn't find ncurses_cfg.h

I tried to run some of the precompiled samples in ./test but everytime it says "Error opening terminal: xterm

I'm very confused. It works on my Ubuntu box at home. I'm away from home on my laptop.
 
Old 03-09-2015, 07:04 AM   #6
sunbelt57
LQ Newbie
 
Registered: Aug 2013
Location: Wyoming
Posts: 19

Original Poster
Rep: Reputation: Disabled
http://www.linuxquestions.org/questi...27#post5039827
 
Old 03-09-2015, 09:24 AM   #7
sunbelt57
LQ Newbie
 
Registered: Aug 2013
Location: Wyoming
Posts: 19

Original Poster
Rep: Reputation: Disabled
I just downloaded ncurses_programs.tar.gz and all the samples seem to compile and run fine so I can take it from here.
 
Old 03-09-2015, 11:57 AM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
As it seems, Ubuntu does not include the ncurses package [anymore]. So you are right that it is not in the package manager. (An incomprehensible decision by the Ubuntu maintainers BTW)

But the source package is still there, and it is always better to compile from the Ubuntu source, using the Ubuntu tools than use an independent package. If you use the Ubuntu tools, your own package becomes part of the package management system. If you do it outside the package manager sooner or later you might break your system.

In order to compile correctly, you should have installed libncurses5-dev. It has been reported it is not installed automatically when you install the source files.

jlinkels
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cursing ncurses ... reverted to Slackware 14.0 version of ncurses 5.9 aaazen Slackware 3 06-18-2014 11:14 AM
[SOLVED] Ncurses bug or ncurses program error. errigour Programming 2 01-24-2013 08:36 AM
how to print text in color by ncurses without opening a ncurses window Greatrebel Programming 0 12-20-2006 09:15 AM
ncurses - install problem schtevo Linux - Software 1 01-25-2006 03:38 PM
ncurses-5.2-28 conflicts with file from package ncurses-5.2-12 tubby Linux - Software 4 06-16-2002 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration