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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-08-2015, 03:18 PM
|
#1
|
LQ Newbie
Registered: Aug 2013
Location: Wyoming
Posts: 19
Rep:
|
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?
|
|
|
03-08-2015, 08:25 PM
|
#2
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
|
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
|
|
|
03-08-2015, 09:35 PM
|
#3
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
Make sure your terminal supports colors.
|
|
|
03-08-2015, 09:46 PM
|
#4
|
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524
|
Different terminals may have different control sequences for outputting colours.
E.g. terminals: linux, xterm
|
|
|
03-09-2015, 07:00 AM
|
#5
|
LQ Newbie
Registered: Aug 2013
Location: Wyoming
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by jlinkels
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.
|
|
|
03-09-2015, 07:04 AM
|
#6
|
LQ Newbie
Registered: Aug 2013
Location: Wyoming
Posts: 19
Original Poster
Rep:
|
|
|
|
03-09-2015, 09:24 AM
|
#7
|
LQ Newbie
Registered: Aug 2013
Location: Wyoming
Posts: 19
Original Poster
Rep:
|
I just downloaded ncurses_programs.tar.gz and all the samples seem to compile and run fine so I can take it from here.
|
|
|
03-09-2015, 11:57 AM
|
#8
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
|
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
|
|
|
All times are GMT -5. The time now is 07:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|