solaris 11 stdio.h: No such file or directory

时间:2023-01-19 17:39:23

http://www.zendo.name/solaris-11-stdio-h%EF%BC%9A-no-such-file-or-directory/

在Solaris 11下使用gcc编译器,安装编译器

1
pkg install gcc-45 或者 pkg install gcc-3

数字是gcc版本号

但是在进行编译时,会出现头文件错误,最基本的stdio.h也找不到

1
root@solaris11:~# cat hello.c
1
2
3
4
5
6
7
8
#include <stdio.h>
int main(int argc, char* argv[])
{
    while (1) {
        getchar();
    }
    return 0;
}
1
root@solaris11:~$ gcc hello.c
1
hello.c:1:19 fatal error: stdio.h: No such file or directory
1
root@solaris11:~$ slocate stdio.h
1
2
3
4
5
6
7
8
/usr/include/glib-2.0/glib/gstdio.h
/usr/include/libgsf-1/gsf/gsf-output-stdio.h
/usr/include/libgsf-1/gsf/gsf-outfile-stdio.h
/usr/include/libgsf-1/gsf/gsf-input-stdio.h
/usr/include/libgsf-1/gsf/gsf-infile-stdio.h
/usr/include/ast/ast_stdio.h
/usr/include/ast/stdio.h
/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/include/ssp/stdio.h

用slocate寻找,找到了很多头文件,可是没用,难道是链接库的位置错误?不是,默认的solaris 11并没有安装完整的头文件,只需要安装system/header即可

1
pkg install system/header

这样就可以正常编译了,而solocate的结果里也会多出一项 /usr/gcc/4.5/include/c++/4.5.2/tr1/stdio.h

solaris 11 stdio.h: No such file or directory的更多相关文章

  1. numa&period;h:No such file or directory 解决方法

    参考: numa.h:No such file or directory numa.h:No such file or directory 解决方法 Ubuntu: $ apt-get install ...

  2. Python&period;h:No such file or directory

    出现No such file or directory的错误,有两种情况,一种是真的没有Python.h这个文件,一种是Python的版本不对, 可以进入/usr/include/文件夹下的Pytho ...

  3. 如何解决Python&period;h:No such file or directory

    安装python2.7对应的dev sudo apt-get install python-dev 安装python3.6对应的dev sudo apt-get install python3-dev

  4. OK6410 rmmod卸载模块失败:No such file or directory -- 转

    原文地址:http://hi.baidu.com/andio/item/b8be9810282841433a176e86 rmmod chdir no such file or directory 说 ...

  5. 新增分区格式化时提示设备文件不存在:--- No such file or directory的处理方法

    [原文链接]:http://blog.itpub.net/28874898/viewspace-774249/ 在系统中的空余空间添加新的分区:   fdisk   /dev/sda (第一块硬盘上) ...

  6. 使用exceljs时报错:no such file or directory

    最近使用exceljs生成excel并保存时,总是失败 await workbook.xlsx.writeFile(tep) .then(function () { context.result = ...

  7. 交叉编译工具链bash&colon; gcc:no such file or directory

    在进行交叉编译工具链安装时,有三种方法: 1.源码编译,手动安装 2.二进制可执行文件直接安装 3.直接解压工具链,手动修改环境变量 为了方便,我们多用方法3进行安装.但是问题来了,你的工具链制作时有 ...

  8. 手动编译源码安装包报错 fatal error:cruses&period;h: no such file or direcrory

    很明显是缺少cruses.h这个文件,但是用yum搜索又搜不到,可能是我的yum源的库包太少的原因吧. 后来多方查找,发现cruses.h这个头文件属于ncurses模块,需要安装ncurses-de ...

  9. 利用Qt Designer 进行 空间提升propomotion 的时候异常: NO such file or directory

    1. 因为在提升的时候,只设置了 类名,以及文件名,但是没有给定Qt 的uic 的指定搜索路径,因此报错 在生成的ui_xxxx.h文件必然找不到这个文件. 如下图: 2. 解决方法 在项目的属性中: ...

随机推荐

  1. Delphi&lowbar;08&lowbar;Delphi&lowbar;Object&lowbar;Pascal&lowbar;基本语法&lowbar;06&lowbar;函数参数

    发现Delphi中关于函数参数部分的内容还是比较多的,暂时说到这篇随笔为止吧,以后再继续讨论一下函数的参数部分的内容. 一 工程文件 program DefaultParameter; {$APPTY ...

  2. Excel常用操作

    [对Excel工作表,按某一列数据进行排序] 选中这些数据,在菜单栏上点"数据 - 排序",在弹出的窗口中的主要关键字里选择这一列,按升序或降序,那么其它的数据也会跟着它一一对应变 ...

  3. leetcode 172

    172. Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. Note: ...

  4. java complier compliance level问题引发的思考

    http://blog.csdn.net/shan9liang/article/details/17266519 ******************************************* ...

  5. C&plus;&plus;编程开发学习的50条建议(转)

    每个从事C++开发的朋友相信都能给后来者一些建议,但是真正为此进行大致总结的很少.本文就给出了网上流传的对C++编程开发学习的50条建议,总结的还是相当不错的,编程学习者(不仅限于C++学习者)如果真 ...

  6. 构建ASP&period;NET MVC4&plus;EF5&plus;EasyUI&plus;Unity2&period;x注入的后台管理系统(44)-工作流设计-设计表单

    原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(44)-工作流设计-设计表单 系列目录 设计表单是比较复杂的一步,完成一个表单的设计其实很漫长,主要分为四 ...

  7. 【转】Entity Framework教程

    转自:http://www.cnblogs.com/xray2005/category/189491.html   Entity Framework系列文章导航 摘要: 本节集合了Entity Fra ...

  8. jQuery点击下拉菜单的展示与隐藏

    首先点击显示某个div,然后要求再次点击时消失,或者点击document的其他地方会隐藏掉这个层,涉及到冒泡的问题,阻止document冒泡到dom上.代码如下: var $el = $(" ...

  9. tengine 的优化

    查服务器CPU的核数 : [root@c01 conf]# grep processor /proc/cpuinfo |wc -l 4 [root@c01 conf]# grep -c process ...

  10. 【Linux】在虚拟机上安装CentOS7

    在配置好的机子上,可以装个双系统,但是在我自己的本子上,磁盘读写太垃圾了,连压缩卷 都执行不了,分不出空间,装不了CentOS系统,没办法,采用虚拟机的方式,把它转起来. -------------- ...