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.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.h:No such file or directory

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

  3. 如何解决Python.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: gcc:no such file or directory

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

  8. 手动编译源码安装包报错 fatal error:cruses.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. Appium IOS 自己主动化測试初探

    手机平台的自己主动化測试工具非常多,之前研究过了安卓和苹果的原生自己主动化測试框架.经一些同事介绍,貌似Appium是个不错的工具. 想记录一下研究的结果,也算是篇干货的文章 在网上也看了一些视频.个 ...

  2. android中图片倒影、圆角效果重绘

    本文用来记录一些Android 操作图片的方法,方便查看. 1.将Drawable转化为Bitmap public static Bitmap drawableToBitmap(Drawable dr ...

  3. PHP和JSON

    PHP和JSON 一.总结 1.php中json的使用方法:php中json的使用超级简单啦,主要是两个函数json_encode(编码)和json_decode(解码),像md5加密 2.json的 ...

  4. 36.Node.js 工具模块--OS模块系统操作

    转自:http://www.runoob.com/nodejs/nodejs-module-system.html Node.js os 模块提供了一些基本的系统操作函数.我们可以通过以下方式引入该模 ...

  5. 1.22 Python基础知识 - 正则表达式

    Python正则表达式 正则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配. Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式. re ...

  6. ODBC总结

    引用头文件:sql.h.sqlext.h.sqltypes.h 添加库文件:odbc32.lib   odbccp32.lib 1.定义环境变量: SQLHENV henv =nullptr://环境 ...

  7. 洛谷 P1130 红牌

    P1130 红牌 题目描述 某地临时居民想获得长期居住权就必须申请拿到红牌.获得红牌的过程是相当复杂 ,一共包括N个步骤.每一步骤都由政府的某个工作人员负责检查你所提交的材料是否符合条件.为了加快进程 ...

  8. 12. ZooKeeper之Java客户端API使用—创建会话。

    转自:https://blog.csdn.net/en_joker/article/details/78686649 客户端可以通过创建一个ZooKeeper(org.apache.zookeeper ...

  9. 获取input file 选中的图片,并在一个div的img里面赋值src实现预览

    代码如下利用html5实现:几乎兼容所有主流浏览器,当然IE必须是IE 6以上 [jquery代码] $(function() { $("#file_upload").change ...

  10. spring与cxf整合配置webservice接口(以jaxws:server的方式配置)

    ps:最近项目需要跟其他系统做同步,需要使用webservice来提供接口给其他系统调用:临时抱佛脚赶紧去网上找了下资料,发现用Endpoint的方式发布接口好容易哦:赶紧写了个例子做验证,发布成功. ...