2010年1月11日星期一

solaris 10 自身帶gcc make

嘗試在solaris10下編譯apache, 儘管已經下載了gcc但是還是不能通過

報錯“make: can not found”

手工運行一把,確實如此,怎麼辦呢?google

發現soalris下確實已經有了gcc和make的program,但是位置沒有在/usr/bin or /sbin/下

gcc 在這裏:

bash-3.00# cd /usr/sfw/bin

bash-3.00# ./gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
bash-3.00#

bash-3.00# cd /usr/ccs/bin

bash-3.00# ./make
make: Fatal error: No arguments to build

不熟悉solaris, 發現沒有default home directory, 只好把加載到 /etc/profile文件中

PATH=$PATH:/usr/ccs/bin:/usr/sfw/bin
export PATH

從新configure;make ;make install

+--------------------------------------------------------+
| You now have successfully built and installed the      |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the         |
| (initially created or preserved) configuration files   |
|                                                        |
|   /user/local/apache/conf/httpd.conf
|                                                        |
| and then you should be able to immediately fire up     |
| Apache the first time by running:                      |
|                                                        |
|   /user/local/apache/bin/apachectl start
|                                                        |
| Thanks for using Apache.       The Apache Group        |
|                                http://www.apache.org/  |
+--------------------------------------------------------+

ok, 記錄一下,備忘!

没有评论:

发表评论