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. 如何创建Hiren的BootCD USB磁盘 -- 制作U盘启动盘

    如何创建Hiren的BootCD USB磁盘 原文 https://www.wintips.org/how-to-create-hirens-bootcd-usb-disk/  本文基本是谷歌翻译 H ...

  2. 用jersey写 java restfull web services 输出xml格式数据

    1 logic package com.toic.rest; import com.toic.model.Folder; import java.util.logging.Logger; import ...

  3. C#空值和null判断

    一.空值判断效率 string s = ""; if(s == ""){} if(s == string.Empty){} if (string.IsNullO ...

  4. 高中生活-第9篇-开学之初的“失足”囧事,"刻舟求剑"导致腿折了

    时间过得好快啊,上次发表"高中生活-第8篇:夏天的空调,冬天的味道"是2014年9月30日,一转眼,就是一年啊. 我自己以为,很多人可能都以为,我又半途而废了,实则不是哦~ 行百里 ...

  5. Apache httpd.conf 配置文件语法验证

    Apache 的 httpd.conf文件改动之后,必须重新启动server才干生效. 有时server在提供服务的时候,直接更改配置,重新启动服务.会带来非常大的危急性. 假设能在改动配置之后,先验 ...

  6. Spark SQL概念学习系列之DataFrame与RDD的区别

    不多说,直接上干货! DataFrame的推出,让Spark具备了处理大规模结构化数据的能力,不仅比原有的RDD转化方式更加简单易用,而且获得了更高的计算性能.Spark能够轻松实现从MySQL到Da ...

  7. Java web开发了解

    1.什么是Java web项目? F.A.Q: 服务器 服务器,也称伺服器,是提供计算服务的设备.由于服务器需要响应服务请求,并进行处理,因此一般来说服务器应具备承担服务并且保障服务的能力.服务器的构 ...

  8. VC++的函数指针和回调函数 及友元函数

    什么是函数指针 函数指针是指向函数的指针变量.也就是说,它是一个指针变量,而且该指针指向一个函数. 对于指针变量来说,它的值是它指向的变量的地址.举个例子:指针变量pi是指向一个整型变量i的指针,则变 ...

  9. Altium Designer如何删除以布的线

  10. windows下安装wabt

    windows下安装wabt 安装前准备cmake.mingw环境 安装cmake 安装mingw 步骤 # 1.克隆wabt源码 git clone https://github.com/WebAs ...