在gcc 中想 编译 静态库 ar 命令找不到 请问在哪里设置? 在线等

kong_nuc 2008-10-24 10:38:43
在gcc 中想 编译 静态库 ar 命令找不到 请问在哪里设置? 在线等
我的GCC现在已经装上了,编译别的程序可以行,可是找不到AR命令?类似于MAKE命令也找不到
...全文
362 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
kong_nuc 2008-10-27
  • 打赏
  • 举报
回复
谢谢大家,这个只要设置一下环境变量就可以了。
独孤过儿 2008-10-24
  • 打赏
  • 举报
回复
download的包是fileName.gz格式的,这样做
$ gzip -d fileName.gz
$ pkgadd -d fileName
Arthur_ 2008-10-24
  • 打赏
  • 举报
回复
用命令, pkgadd software_package_name
缺省情况下,从 /var/spool/tmp 下找安装包,也可用 选项 -d 指定位置,注意路径加文件,而不是用来指定目录的

可参考下文:

Previous
Table of Contents
Next


The pkgadd command, by default, looks for packages in the /var/spool/pkg directory. In this context, any packages that you have copied into that directory are "spooled" and waiting for installation. If there are no packages in the /var/spool/pkg directory, installation fails, as shown in the following example:
castle# pkgadd
pkgadd: ERROR: no packages were found in
castle#
To install packages directly from media, such as from a CD-ROM, you must use the -d option to specify a full (absolute) pathname to the directory on the device that contains the packages that you want to install.
If pkgadd encounters a problem, information about the problem appears along with the prompt Do you want to continue with this installation of the package?. Type yes, no, or quit and press Return.Typing yes continues with the installation. If you have specified more than one package, typing no stops the installation of the package that failed, but does not stop the installation of the other packages. Typing quit stops installation of all packages.
In the following example, although the command-line argument specifies a valid directory on the CD-ROM, that directory contains no packages and the pkgadd command returns an error message:
castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6
pkgadd: ERROR: attempt to process datastream failed
- open of failed, errno=2
pkgadd: ERROR: could not process datastream from
castle#
In the following example, the command-line argument specifies a path to a valid directory on the CD-ROM that contains packages:
castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product
The following packages are available:
1 AXILvplr.c Axil platform links
(sparc.sun4c) 5.6,REV=96.01.21.22.49
2 AXILvplr.m Axil platform links
(sparc.sun4m) 5.6,REV=96.01.21.22.50
3 AXILvplr.u Axil platform links
(sparc.sun4u) 5.6,REV=96.01.21.22.49
4 AXILvplu.c Axil usr/platform links
(sparc.sun4c) 5.6,REV=96.01.21.22.51
5 AXILvplu.m Axil usr/platform links
(sparc.sun4m) 5.6,REV=96.01.21.22.51
6 AXILvplu.u Axil usr/platform links
(sparc.sun4u) 5.6,REV=96.01.21.22.51
7 FJSVvplr.u Fujitsu platform specific symlinks (Root)
(sparc.sun4u) 1.0,REV=97.05.26.01
8 FJSVvplu.u Fujitsu platform specific symlinks (user)
(sparc.sun4u) 1.0,REV=97.05.26.01
9 PFUaga.m AG-10 Device Driver
(sparc.sun4m) 1.4.0,REV=0.0.3
10 PFUaga.u AG-10 Device Driver
(sparc.sun4u) 1.4.0,REV=0.0.3
... 298 more menu choices to follow;
for more choices, to stop display:The following packages
are available:
Alternatively, you can use the cd command to change to the directory that contains the packages, and then type pkgadd -d . and press Return to proceed with installation, as shown in the following example:
castle# cd /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product
castle@ pkgadd -d .
The following packages are available:
1 AXILvplr.c Axil platform links
(sparc.sun4c) 5.6,REV=96.01.21.22.49
2 AXILvplr.m Axil platform links
(sparc.sun4m) 5.6,REV=96.01.21.22.50
3 AXILvplr.u Axil platform links
(sparc.sun4u) 5.6,REV=96.01.21.22.49
4 AXILvplu.c Axil usr/platform links
(sparc.sun4c) 5.6,REV=96.01.21.22.51
5 AXILvplu.m Axil usr/platform links
(sparc.sun4m) 5.6,REV=96.01.21.22.51
6 AXILvplu.u Axil usr/platform links
(sparc.sun4u) 5.6,REV=96.01.21.22.51
7 FJSVvplr.u Fujitsu platform specific symlinks (Root)
(sparc.sun4u) 1.0,REV=97.05.26.01
8 FJSVvplu.u Fujitsu platform specific symlinks (user)
(sparc.sun4u) 1.0,REV=97.05.26.01
9 PFUaga.m AG-10 Device Driver
(sparc.sun4m) 1.4.0,REV=0.0.3
10 PFUaga.u AG-10 Device Driver
(sparc.sun4u) 1.4.0,REV=0.0.3
... 298 more menu choices to follow;
for more choices, to stop display:The following packages
are available:
Checking the Installation of a Package
You can use the pkgchk command to check the completeness, specific pathname, file contents, and file attributes of an installed package.
The syntax of the pkgcheck command follows:
pkgchk pkgid
For example, to check the package SUNWman, the online manual pages, type pkgchk SUNWman and press Return. If the prompt comes up without any messages, the package has installed properly.
oak% pkgchk SUNWman
oak%
If you do get messages, however, the package has not installed properly, as shown in the following example:
oak% pkgchk SUNWssoft
WARNING: no pathnames were associated with
oak%
You can specify more than one package identifier by typing a list separated by spaces. If you do not specify a pkgid, the complete list of packages on a system is checked.
You can check the installation completeness of a specific pathname by using the -p option with pkgchk, using the following syntax:
pkgchk -p pathname
If you want to check more than one path, provide the paths as a comma-separated list.
You can check the installation completeness of just the file attributes by using the -a option with the pkgchk command. You can check the installation completeness of just the file contents by using the -c option with the pkgchk command. Here is the appropriate syntax:
# /usr/sbin/pkgchk [ -a | -c ] pkgid
To check the completeness of a spooled package, use the -d option with the pkgchk command. This option looks in the specified directory or on the specified device and performs a check of the package; for example:
# /usr/sbin/pkgchk -d spool-dir pkgA
In this example, the pkgchk command looks in the spool directory spool-dir and checks the completeness of the package named pkgA.
NOTE: Spooled package checks are limited because not all information can be audited until a package is installed.
Previous
Table of Contents
Next

from:
http://snap.nlc.dcccd.edu/reference/sysadmin/julian/ch13/290-293.html


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/68079/showart_1183338.html
kong_nuc 2008-10-24
  • 打赏
  • 举报
回复
我下载了一个Binutils,怎么安装啊?
kong_nuc 2008-10-24
  • 打赏
  • 举报
回复
我的GCC是安装是用gcc-3.4.6-sol10-x86-local.gz和 libiconv-1.11-sol10-x86-local.gz这两个包默认的全部安装
kong_nuc 2008-10-24
  • 打赏
  • 举报
回复
我用的是solaris 10 X86 ,在虚拟机上运行,我用ROOT用户操作的,用别的用户操作也不行
xhs_lh04 2008-10-24
  • 打赏
  • 举报
回复
哪个环境啊
fox000002 2008-10-24
  • 打赏
  • 举报
回复
不知 lz 用的什么平台

需要安装 Binutils

65,211

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧