Linux
梅朵夕颜
这个作者很懒,什么都没留下…
展开
-
Linux使用open函数无法打开驱动
测试程序如下:#include <stdio.h>#include <fcntl.h>#define MEM_CLEAR 1int main(){ int dev_fd; char read_buf[30]; char write_buf[]="hello how are you"; dev_fd = open("/dev/globalmem", O_RDWR | O_NONBLOCK); if(dev_fd==-1) { printf("cannot op原创 2020-06-05 10:51:53 · 1257 阅读 · 0 评论 -
Ubuntu implicit declaration of function xxx 和format %u expects argument of type xxx解决办法
在静态库的生成和使用时遇到了两个问题第一个问题产生的原因有两个没有把函数所在的c文件生成.o目标文件。在函数所在的c文件中定义了,但是没有在与之相关联的.h文件中声明。参考文章http://blog.chinaunix.net/uid-21558711-id-34462.html我的解决办法:建立.h文件,并在需要引用的.c文件中引入该.h文件unsgn_pow.cunsgn_pow.hpow_test.c第一个问题解决第二个问题,在执行编译命令时添加-Wformat=0g原创 2020-06-03 17:29:03 · 453 阅读 · 0 评论 -
Linux vi提示E325:ATTENTION
用vi打开/etc/resolv.conf提示如下信息按照提示删去/etc/.resolv.conf.swp即可原创 2020-06-02 23:41:09 · 558 阅读 · 0 评论 -
DNS服务器 配置正向解析域文件时提示unknown RR type xxx
检验正向解析域文件是否书写正确sudo named-checkzone hanmengru.example.com /etc/bind/zones/db.hanmengru.example.com提示如下主机名前不能有空格去掉ns1.hanmengru.example.com和host1.hanemengru.example.com前的空格问题解决...原创 2020-06-02 23:15:46 · 2707 阅读 · 0 评论 -
Linux vi上下左右键出现字母问题
https://www.cnblogs.com/wangshuyi/p/6078678.html原创 2020-06-02 19:25:12 · 1077 阅读 · 0 评论 -
Ubuntu 解决apt-get安装openssh-server依赖缺失问题
问题前提:在Linux中安装git,生成本地密钥后发送给远程端显示报错ssh:connect to host localhost port 22:connection refused百度之后发现要装ssh但是执行sudo apt-get install openssh-server后报错提示缺少依赖有文章说先安装aptitude,再用aptitude安装包sudo apt install aptitudesudo aptitude install xxx但是很难过,我安装aptitud原创 2020-06-02 11:52:24 · 2602 阅读 · 0 评论 -
Ubuntu 解决E:Unable to locate package xxx
前提:已经联网在虚拟机关闭时改为桥接模式,启动虚拟机即可联网已经在配置中更改为国内镜像(改为的是阿里云的镜像)然后参考下述文章http://www.bloguan.com/?id=463更改完毕后重新执行sudo apt-get install xxx即可...原创 2020-06-01 22:07:33 · 865 阅读 · 0 评论