免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 10563 | 回复: 3

/bin/sh: cc: command not found -- ubuntu [复制链接]

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
发表于 2011-12-18 11:21 |显示全部楼层
Hi, My friends.

I wanted to install module ReadKey so i used command

cpan Term::ReadKey
I am getting error message: /bin/sh: cc: command not found

I tried to find which compilere I have

I used command

abcd-tstva2:~# which cc
abcd-tstva2:~# which CC
abcd-tstva2:~# which g++
abcd-tstva2:~# which c++

I got no result. Does that mean that no compiler is installed on my OS

Now, I am trying to install ReadKey manually

When I write at path ~/.cpan/sources/authors/id/J/JS/JSTOWE/TermReadKey-2.30

perl Makefile.PL
it works fine

But when I do make test

I get
abcd-tstva2:~/.cpan/sources/authors/id/J/JS/JSTOWE/TermReadKey-2.30# make test
cp ReadKey.pm blib/lib/Term/ReadKey.pm
AutoSplitting blib/lib/Term/ReadKey.pm (blib/lib/auto/Term/ReadKey)
/usr/bin/perl -I/usr/share/perl/5.8 genchars.pl

Writing termio/termios section of cchars.h... Done.
Checking for sgtty...
        Sgtty NOT found.
Writing sgtty section of cchars.h... Done.
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.8/ExtUtils/typemap  ReadKey.xs > ReadKey.xsc && mv ReadKey.xsc ReadKey.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.30\" -DXS_VERSION=\"2.30\" -fPIC "-I/usr/lib/perl/5.8/CORE"   ReadKey.c
/bin/sh: cc: command not found
make: *** [ReadKey.o] Error 127

Saying
/bin/sh: cc: command not found

How should I fix this. I am new to Debain/Linux
I also tried following

abcd-tstva2:~# up2date cc
-su: up2date: command not found
abcd-tstva2:~# up2date CC
-su: up2date: command not found
abcd-tstva2:~# yum
-su: yum: command not found
abcd-tstva2:~# update CC
-su: update: command not found

abcd-tstva2:~# apt-get -b cc
E: Invalid operation cc
abcd-tstva2:~# apt-get -b CC
E: Invalid operation CC
abcd-tstva2:~# apt-get CC
E: Invalid operation CC
abcd-tstva2:~# apt-get cc
E: Invalid operation cc

So please guide me how to fix this problem

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2011-12-18 18:44 |显示全部楼层
用新立得装一下 gcc 这个包

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2011-12-18 22:12 |显示全部楼层
Your problem is not about installing Term::ReadKey but setting up a compiling environment correctly.

BTW. you can say you are new to Debain, but you can't say you are new to command 'man'.

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2011-12-18 22:13 |显示全部楼层
Your problem is not about installing Term::ReadKey but setting up a compiling environment correctly.

BTW. you can say you are new to Debain, but you can't say you are new to command 'man'.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP