请问Solaris10系统安装包里面有自带的c++编译器吗?
如题.我第一次装Solaris10,请以前装过的前辈指点,谢谢!
[解决办法]
安装的Solaris带有编译器gcc/g++,
在/usr/sfw/bin目录下,
可以链接到/usr/bin下
ln -sf /usr/bin/gcc /usr/sfw/gcc
ln -sf /usr/bin/g++ /usr/sfw/g++
编译C程序用gcc,C++用g++
[解决办法]
我刚装过:具体步骤如下:
olaris 安装gcc gdb进行程序开发与调试?
1. 打开网址http://www.sunfreeware.com/indexintel10.html 下载下列软件包
850307 -rw-r--r-- 1 777 root 293K 2010-05-14 13:43 expat-2.0.1-sol10-x86-local.gz
850318 -rw-r--r-- 1 777 root 77M 2010-05-14 13:49 gcc-3.4.6-sol10-x86-local
850309 -rw-r--r-- 1 777 root 15M 2010-05-14 13:44 gdb-6.8-sol10-x86-local.gz
850310 -rw-r--r-- 1 777 root 1.5M 2010-05-14 13:43 libiconv-1.13.1-sol10-x86-local.gz
850311 -rw-r--r-- 1 777 root 112K 2010-05-14 13:44 libintl-3.4.0-sol10-x86-local.gz
850312 -rw-r--r-- 1 777 root 2.7M 2010-05-14 13:43 ncurses-5.7-sol10-x86-local.gz
2. gunzip *.gz
3. pkgadd -d gcc-3.4.6-sol10-x86-local //install
其他安装包方法类似
4. 手工设置root环境变量,添加PATH 、LD_LIBRARY_PAT
export PATH=$PATH: /usr/local/bin
export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH: /usr/local/lib
5. 完毕后发现gcc -v报错:ld.so.1: gcc: fatal: libintl.so.3: open failed: No such file or directory,那么要安装libintl库
6. 安装libintl库
7. 安装gdb
gunzip gdb-6.8-sol10-x86-local.gz
pkgadd -d gdb-6.8-sol10-x86-local
在/etc/profile中修改追加环境变量:
PATH=$PATH:/usr/sfw/bin:/usr/local/bin
LD_LIBRARY_PATH=/usr/sfw/lib
export PATH
export LD_LIBRARY_PATH
网上好多
我还做了一些笔记,都发上来吧:
solaris 应用
增加tab键支持?
编辑/etc/passwd文件,找到root:superuser一行将sh改为bash
增加ls显示颜色?
1. download:
ftp://ftp.sunfreeware.com/pub/freeware/intel/10/coreutils-6.4-sol10-x86-local.gz
2.gzip -d coreutils-6.4-sol10-x86-local.gz
3.pkgadd -d coreutils-6.4-sol10-x86-local
4.vi /etc/DIR_COLORS 添加如下内容
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults. # COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty # Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0 # Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1 # Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to # This is for files with execute permission:
EXEC 01;32 # List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.sh 01;32
.csh 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.bz 01;31
.tz 01;31
.rpm 01;31
.cpio 01;31
.jpg 01;35 # image formats
.gif 01;35
.bmp 01;35
.xbm 01;35
.xpm 01;35
.png 01;35
.tif 01;35 5./usr/local/bin/ls --color /
5. 保存环境变量到配置文件下次使用
vi /.bashrc
export PATH=/usr/local/bin:$PATH
alias ls='ls --color'
vi /etc/profile
alias ls='ls --color'
增加用户名主机名显示?
在根目录下创建".profile"文件,添加下列信息,保存
PS1='[\u@\h:$PWD]#'
export PS1
make执行时提示command not found?
添加/usr/ccs/bin/路径至PATH环境变量,export PATH="/usr/ccs/bin:/opt/sfw/bin:$PATH"
solaris默认安装没有c开发环境?
需要安装sun stdio软件,光盘Develop目录下有相关文件.
solaris 安装gcc gdb进行程序开发与调试?
1. 打开网址http://www.sunfreeware.com/indexintel10.html 下载下列软件包
850307 -rw-r--r-- 1 777 root 293K 2010-05-14 13:43 expat-2.0.1-sol10-x86-local.gz
850318 -rw-r--r-- 1 777 root 77M 2010-05-14 13:49 gcc-3.4.6-sol10-x86-local
850309 -rw-r--r-- 1 777 root 15M 2010-05-14 13:44 gdb-6.8-sol10-x86-local.gz
850310 -rw-r--r-- 1 777 root 1.5M 2010-05-14 13:43 libiconv-1.13.1-sol10-x86-local.gz
850311 -rw-r--r-- 1 777 root 112K 2010-05-14 13:44 libintl-3.4.0-sol10-x86-local.gz
850312 -rw-r--r-- 1 777 root 2.7M 2010-05-14 13:43 ncurses-5.7-sol10-x86-local.gz
2. gunzip *.gz
3. pkgadd -d gcc-3.4.6-sol10-x86-local //install
其他方法类似
4. 手工设置root环境变量,添加PATH 、LD_LIBRARY_PAT
export PATH=$PATH: /usr/local/bin
export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH: /usr/local/lib
5. 完毕后发现gcc -v报错:ld.so.1: gcc: fatal: libintl.so.3: open failed: No such file or directory,那么要安装libintl库
6. 安装libintl库
7. 安装gdb
gunzip gdb-6.8-sol10-x86-local.gz
pkgadd -d gdb-6.8-sol10-x86-local
在/etc/profile中修改追加环境变量:
PATH=$PATH:/usr/sfw/bin:/usr/local/bin
LD_LIBRARY_PATH=/usr/sfw/lib
export PATH
export LD_LIBRARY_PATH
solaris上添加不支持的usb设备?
添加/kernel/drv/scsa2usb.conf ->attribute-override-list = "vid=096e reduced-cmd-support=true";
reboot 重启
# prtconf -Dv|grep usb|less
value='usb96e,6.109' + 'usb96e,6' + 'usbif96e,class3.0.0' + 'usbif96e,class3.0' + 'usbif96e,class3' + 'usbif,class3.0.0' + 'usbif,class3.0' + 'usbif,class3' + 'usb,device'
[root@solaris10:/usr/hongbin/source]#add_drv -m '* 0666 root sys' -i '"usb96e,6.109"' ugenadd_drv -m '* 0666 root sys' -i '"usb96e,6.109"' ugen
[root@solaris10:/usr/hongbin/source]# update_drv -m '* 0666 root sys' -i '"usb8e6,3437.100"' ugen