免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5130 | 回复: 14
打印 上一主题 下一主题

软件编译安装问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-19 17:07 |只看该作者 |倒序浏览
20可用积分
公司一台 t2000上,定制安装了系统solaris 10 (非默认安装),有些东西没装全。
现在要安装一个sudo,提示无法编译:
configure: error: C compiler cannot create executables
我已经装了gcc相关的三个包:
pkginfo -l |grep SUNWgcc
   PKGINST:  SUNWgcc
   PKGINST:  SUNWgccS
   PKGINST:  SUNWgccruntime

然后上网查询,说是libiconv没有装,我从sunfreeware上下了一个,装上后还是报错,请帮我看看是什么错误?谢谢


  1.   $ ./configure
  2. ## --------- ##
  3. ## Platform. ##
  4. ## --------- ##
  5. hostname = xxxxxx
  6. uname -m = sun4v
  7. uname -r = 5.10
  8. uname -s = SunOS
  9. uname -v = Generic_118833-36
  10. /usr/bin/uname -p = sparc
  11. /bin/uname -X     = System = SunOS
  12. Node = peacock
  13. Release = 5.10
  14. KernelID = Generic_118833-36
  15. Machine = sun4v
  16. BusType = <unknown>
  17. Serial = <unknown>
  18. Users = <unknown>
  19. OEM# = 0
  20. Origin# = 1
  21. NumCPU = 16
  22. /bin/arch              = sun4
  23. /usr/bin/arch -k       = sun4v
  24. /usr/convex/getsysinfo = unknown
  25. /usr/bin/hostinfo      = unknown
  26. /bin/machine           = unknown
  27. /usr/bin/oslevel       = unknown
  28. /bin/universe          = unknown
  29. PATH: /usr/bin
  30. PATH: /usr/sbin
  31. PATH: /etc
  32. PATH: /usr/sfw/bin.

  33. ## ----------- ##
  34. ## Core tests. ##
  35. ## ----------- ##
  36. configure:2022: Configuring Sudo version 1.6.9
  37. configure:2581: checking whether to lecture users the first time they run sudo
  38. configure:2599: result: yes
  39. configure:2610: checking whether sudo should log via syslog or to a file by default
  40. configure:2654: result: syslog
  41. configure:2659: checking which syslog facility sudo should log with
  42. configure:2687: result: local2
  43. configure:2690: checking at which syslog priority to log commands
  44. configure:2719: result: notice
  45. configure:2722: checking at which syslog priority to log failures
  46. configure:2751: result: alert
  47. configure:2770: checking how long a line in the log file should be
  48. configure:2798: result: 80
  49. configure:2801: checking whether sudo should ignore '.' or '' in $PATH
  50. configure:2826: result: no
  51. configure:2830: checking whether to send mail when a user is not in sudoers
  52. configure:2852: result: yes
  53. configure:2859: checking whether to send mail when user listed but not for this host
  54. configure:2884: result: no
  55. configure:2888: checking whether to send mail when a user tries a disallowed command
  56. configure:2913: result: no
  57. configure:2917: checking who should get the mail that sudo sends
  58. configure:2941: result: root
  59. configure:2970: checking for bad password prompt
  60. configure:2987: result: Password:
  61. configure:2995: checking for bad password message
  62. configure:3018: result: Sorry, try again.
  63. configure:3021: checking whether to expect fully qualified hosts in sudoers
  64. configure:3046: result: no
  65. configure:3150: checking for umask programs should be run with
  66. configure:3180: result: 0022
  67. configure:3184: checking for default user to run commands as
  68. configure:3208: result: root
  69. configure:3237: checking for editor that visudo should use
  70. configure:3264: result: vi
  71. configure:3269: checking whether to obey EDITOR and VISUAL environment variables
  72. configure:3294: result: no
  73. configure:3298: checking number of tries a user gets to enter their password
  74. configure:3323: result: 3
  75. configure:3326: checking time in minutes after which sudo will ask for a password again
  76. configure:3349: result: 5
  77. configure:3352: checking time in minutes after the password prompt will time out
  78. configure:3375: result: 5
  79. configure:3378: checking whether to use per-tty ticket files
  80. configure:3403: result: no
  81. configure:3407: checking whether to include insults
  82. configure:3434: result: no
  83. configure:3596: checking whether to override the user's path
  84. configure:3621: result: no
  85. configure:3626: checking whether to get ip addresses from the network interfaces
  86. configure:3648: result: yes
  87. configure:3653: checking whether stow should be used
  88. configure:3675: result: no
  89. configure:3681: checking whether to do user authentication by default
  90. configure:3704: result: yes
  91. configure:3709: checking whether to disable running the mailer as root
  92. configure:3732: result: no
  93. configure:3759: checking whether to disable shadow password support
  94. configure:3779: result: no
  95. configure:3784: checking whether root should be allowed to use sudo
  96. configure:3807: result: yes
  97. configure:3812: checking whether to log the hostname in the log file
  98. configure:3835: result: no
  99. configure:3840: checking whether to invoke a shell if sudo is given no arguments
  100. configure:3863: result: no
  101. configure:3868: checking whether to set $HOME to target user in shell mode
  102. configure:3891: result: no
  103. configure:3896: checking whether to disable 'command not found' messages
  104. configure:3920: result: no
  105. configure:3927: checking for egrep
  106. configure:3943: found /usr/bin/egrep
  107. configure:3954: result: egrep
  108. configure:4020: checking for gcc
  109. configure:4047: result: gcc
  110. configure:4285: checking for C compiler version
  111. configure:4292: gcc --version >&5
  112. gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
  113. Copyright (C) 2004 Free Software Foundation, Inc.
  114. This is free software; see the source for copying conditions.  There is NO
  115. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  116. configure:4295: $? = 0
  117. configure:4302: gcc -v >&5
  118. Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
  119. Configured with: /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --pref
  120. ix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-g
  121. nu-ld --enable-languages=c,c++ --enable-shared
  122. Thread model: posix
  123. gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
  124. configure:4305: $? = 0
  125. configure:4312: gcc -V >&5
  126. gcc: `-V' option must have argument
  127. configure:4315: $? = 1
  128. configure:4338: checking for C compiler default output file name
  129. configure:4365: gcc    conftest.c  >&5
  130. /usr/ccs/bin/as: error: unknown option '-'
  131. /usr/ccs/bin/as: error: unknown option 't'
  132. /usr/ccs/bin/as: error: unknown option 'aditional-format'
  133. usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-q] [-s]
  134.           [-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
  135.           [-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
  136.           [-m [-Ym,path]] [-n] [-ul] [-xF] [-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9
  137. a,v9b}]  [-xcode={pic13,pic32}] file.s...
  138. configure:4368: $? = 1
  139. configure:4406: result:
  140. configure: failed program was:
  141. | /* confdefs.h.  */
  142. | #define PACKAGE_NAME "sudo"
  143. | #define PACKAGE_TARNAME "sudo"
  144. | #define PACKAGE_VERSION "1.6.9"
  145. | #define PACKAGE_STRING "sudo 1.6.9"
  146. | #define PACKAGE_BUGREPORT ""
  147. | #define LOGGING SLOG_SYSLOG
  148. | #define LOGFAC "local2"
  149. | #define PRI_SUCCESS "notice"
  150. | #define PRI_FAILURE "alert"
  151. | #define MAXLOGFILELEN 80
  152. | #define SEND_MAIL_WHEN_NO_USER 1
  153. | #define MAILTO "root"
  154. | #define MAILSUBJECT "*** SECURITY information for %h ***"
  155. | #define PASSPROMPT "Password:"
  156. | #define INCORRECT_PASSWORD "Sorry, try again."
  157. | #define SUDO_UMASK 0022
  158. | #define RUNAS_DEFAULT "root"
  159. | #define EDITOR _PATH_VI
  160. | #define TRIES_FOR_PASSWORD 3
  161. | #define TIMEOUT 5
  162. | #define PASSWORD_TIMEOUT 5
  163. | /* end confdefs.h.  */
  164. |
  165. | int
  166. | main ()
  167. | {
  168. |
  169. |   ;
  170. |   return 0;
  171. | }
  172. configure:4413: error: C compiler cannot create executables
  173. See `config.log' for more details.
  174. ## ---------------- ##
  175. ## Cache variables. ##
  176. ## ---------------- ##
  177. ac_cv_env_CC_set=set
  178. ac_cv_env_CC_value=gcc
  179. ac_cv_env_CFLAGS_set=
  180. ac_cv_env_CFLAGS_value=
  181. ac_cv_env_CPPFLAGS_set=
  182. ac_cv_env_CPPFLAGS_value=
  183. ac_cv_env_CPP_set=
  184. ac_cv_env_CPP_value=
  185. ac_cv_env_LDFLAGS_set=
  186. ac_cv_env_LDFLAGS_value=
  187. ac_cv_env_LIBS_set=
  188. ac_cv_env_LIBS_value=
  189. ac_cv_env_YACC_set=
  190. ac_cv_env_YACC_value=
  191. ac_cv_env_YFLAGS_set=
  192. ac_cv_env_YFLAGS_value=
  193. ac_cv_env_build_alias_set=
  194. ac_cv_env_build_alias_value=
  195. ac_cv_env_host_alias_set=
  196. ac_cv_env_host_alias_value=
  197. ac_cv_env_target_alias_set=
  198. ac_cv_env_target_alias_value=
  199. ac_cv_prog_EGREPPROG=egrep
  200. ac_cv_prog_ac_ct_CC=gcc
  201. ac_cv_prog_cc_g=no
  202. ## ----------------- ##
  203. ## Output variables. ##
  204. ## ----------------- ##
  205. AFS_LIBS=''
  206. ALLOCA=''
  207. AR=''
  208. AUTH_OBJS=''
  209. CC='gcc'
  210. CFLAGS=''
  211. CPP=''
  212. CPPFLAGS=''
  213. DEFS=''
  214. DEV='#'
  215. DONT_LEAK_PATH_INFO=''
  216. ECHO='echo'
  217. ECHO_C=''
  218. ECHO_N='-n'
  219. ECHO_T=''
  220. EGREP=''
  221. EGREPPROG='egrep'
  222. EXEEXT=''
  223. GETGROUPS_LIB=''
  224. GREP=''
  225. INSTALL_NOEXEC=''
  226. KRB5CONFIG=''
  227. LDFLAGS=''
  228. LIBOBJS=''
  229. LIBS=''
  230. LIBTOOL=''
  231. LN_S=''
  232. LTLIBOBJS=''
  233. MANTYPE='man'
  234. MAN_POSTINSTALL=''
  235. NET_LIBS=''
  236. NOEXECDIR=''
  237. NROFFPROG=''
  238. OBJEXT=''
  239. OSDEFS=''
  240. PACKAGE_BUGREPORT=''
  241. PACKAGE_NAME='sudo'
  242. PACKAGE_STRING='sudo 1.6.9'
  243. PACKAGE_TARNAME='sudo'
  244. PACKAGE_VERSION='1.6.9'
  245. PATH_SEPARATOR=':'
  246. PROGS='sudo visudo'
  247. RANLIB=''
  248. SED=''
  249. SHELL='/bin/bash'
  250. STRIP=''
  251. SUDOERS_GID='0'
  252. SUDOERS_MODE='0440'
  253. SUDOERS_UID='0'
  254. SUDO_LDFLAGS=''
  255. SUDO_LIBS=''
  256. SUDO_OBJS=''
  257. TRPROG=''
  258. UNAMEPROG=''
  259. YACC=''
  260. YFLAGS=''
  261. ac_ct_CC='gcc'
  262. badpass_message='Sorry, try again.'
  263. badpri='alert'
  264. bindir='$(exec_prefix)/bin'
  265. build=''
  266. build_alias=''
  267. build_cpu=''
  268. build_os=''
  269. build_vendor=''
  270. datadir='${datarootdir}'
  271. datarootdir='${prefix}/share'
  272. docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
  273. dvidir='${docdir}'
  274. env_editor='off'
  275. exec_prefix='NONE'
  276. fqdn='off'
  277. goodpri='notice'
  278. host=''
  279. host_alias=''
  280. host_cpu=''
  281. host_os=''
  282. host_vendor=''
  283. htmldir='${docdir}'
  284. ignore_dot='off'
  285. includedir='${prefix}/include'
  286. infodir='${datarootdir}/info'
  287. insults='off'
  288. lecture='once'
  289. libdir='${exec_prefix}/lib'
  290. libexecdir='${exec_prefix}/libexec'
  291. localedir='${datarootdir}/locale'
  292. localstatedir='${prefix}/var'
  293. logfac='local2'
  294. loglen='80'
  295. long_otp_prompt='off'
  296. mail_no_host='off'
  297. mail_no_perms='off'
  298. mail_no_user='on'
  299. mailsub='*** SECURITY information for %h ***'
  300. mailto='root'
  301. mandir='${datarootdir}/man'
  302. mansectform=''
  303. mansectsu=''
  304. mansrcdir='.'
  305. noexec_file=''
  306. oldincludedir='/usr/include'
  307. passprompt='Password:'
  308. passwd_tries='3'
  309. password_timeout='5'
  310. path_info='on'
  311. pdfdir='${docdir}'
  312. prefix='NONE'
  313. program_transform_name='s,x,x,'
  314. psdir='${docdir}'
  315. root_sudo='on'
  316. runas_default='root'
  317. sbindir='$(exec_prefix)/sbin'
  318. sharedstatedir='${prefix}/com'
  319. sudo_umask='0022'
  320. sysconfdir='/etc'
  321. target=''
  322. target_alias=''
  323. target_cpu=''
  324. target_os=''
  325. target_vendor=''
  326. timedir=''
  327. timeout='5'
  328. tty_tickets='off'
  329. ## ----------- ##
  330. ## confdefs.h. ##
  331. ## ----------- ##
  332. #define PACKAGE_NAME "sudo"
  333. #define PACKAGE_TARNAME "sudo"
  334. #define PACKAGE_VERSION "1.6.9"
  335. #define PACKAGE_STRING "sudo 1.6.9"
  336. #define PACKAGE_BUGREPORT ""
  337. #define LOGGING SLOG_SYSLOG
  338. #define LOGFAC "local2"
  339. #define PRI_SUCCESS "notice"
  340. #define PRI_FAILURE "alert"
  341. #define MAXLOGFILELEN 80
  342. #define SEND_MAIL_WHEN_NO_USER 1
  343. #define MAILTO "root"
  344. #define MAILSUBJECT "*** SECURITY information for %h ***"
  345. #define PASSPROMPT "Password:"
  346. #define INCORRECT_PASSWORD "Sorry, try again."
  347. #define SUDO_UMASK 0022
  348. #define RUNAS_DEFAULT "root"
  349. #define EDITOR _PATH_VI
  350. #define TRIES_FOR_PASSWORD 3
  351. #define TIMEOUT 5
  352. #define PASSWORD_TIMEOUT 5


复制代码

最佳答案

查看完整内容

You left a space between the . and sudo-1.6.9p12-sol10-sparc-local.Please try this:# pkgadd -d ./sudo-1.6.9p12-sol10-sparc-local

论坛徽章:
0
2 [报告]
发表于 2008-02-19 17:07 |只看该作者

回复 #11 culpa 的帖子

You left a space between the . and sudo-1.6.9p12-sol10-sparc-local.
Please try this:

# pkgadd -d ./sudo-1.6.9p12-sol10-sparc-local

论坛徽章:
0
3 [报告]
发表于 2008-02-19 17:16 |只看该作者
把gcc的安装路径添加到path了吗?

论坛徽章:
0
4 [报告]
发表于 2008-02-19 17:33 |只看该作者
我做了一个/.profile文件如下:
PATH=/usr/bin:/usr/sbin:/etc:/usr/sfw/bin.;export PATH
CC=gcc;export CC

环境变量如下
#export
declare -x CC="gcc"
declare -x HOME="/"
declare -x LOGNAME="root"
declare -x MAIL="/var/mail//root"
declare -x OLDPWD
declare -x PATH="/usr/bin:/usr/sbin:/etc:/usr/sfw/bin."
declare -x PWD="/"
declare -x SHELL="/sbin/sh"
declare -x SHLVL="1"
declare -x SSH_CLIENT="172.16.1.1 61996 22"
declare -x SSH_CONNECTION="172.16.1.1 61996 172.16.1.8 22"
declare -x SSH_TTY="/dev/pts/4"
declare -x TERM="vt100"
declare -x TZ="PRC"
declare -x USER="root"

[ 本帖最后由 culpa 于 2008-2-19 17:37 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-02-19 20:42 |只看该作者
solaris10 自带gcc,c等编译器(/usr/sfw/bin),我以前装过sudo,没有问题的。
我是把/usr/sfw/bin和/usr/ccs/bin(make所在的路径)添加到PATH,然后再安装sudo。你可以这样试一下。

论坛徽章:
0
6 [报告]
发表于 2008-02-19 23:50 |只看该作者
SMCliconv

找这个包,或者在solaris 10的介质(应该是在额外软件包中)里面找!

论坛徽章:
0
7 [报告]
发表于 2008-02-20 00:12 |只看该作者
可以从这里 http://www.sunfreeware.com/
下载一个现成的,肯定好用:
sudo-1.6.9p12-sol10-sparc-local.gz

这个 sudo 需要安装另外三个包:
libiconv-1.11-sol10-sparc-local.gz
libintl-3.4.0-sol10-sparc-local.gz
libgcc-3.4.6-sol10-sparc-local.gz

也要从 http://www.sunfreeware.com 下载。

论坛徽章:
0
8 [报告]
发表于 2008-02-20 17:04 |只看该作者
我的运行上述几个安装包时候,包括试图安装gcc时,报同样的错误:
./gcc-3.4.6-sol10-sparc-local: line 899: 1: command not found
环境变量有问题??为啥找不到命令呢?
我现在已经把$PATH改成了/usr/bin:/usr/sbin:/etc:/usr/sfw/bin:/usr/ccs/bin.
为啥还不行呢?

论坛徽章:
0
9 [报告]
发表于 2008-02-20 17:26 |只看该作者
试一下pkgadd

论坛徽章:
0
10 [报告]
发表于 2008-02-20 17:30 |只看该作者
libiconv-1.11-sol10-sparc-local
gcc-3.4.6-sol10-sparc-local      
libintl-3.4.0-sol10-sparc-local
sudo-1.6.9p12-sol10-sparc-local
libgcc-3.4.6-sol10-sparc-local
这些都不是pkg包啊,怎么用pkgadd
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP