红联Linux门户

Linux帮助
  • 关于卸载移动硬盘出现‘device is busy’的情况处理办法

    2015-12-29 - 在linux下umount挂载的优盘或者移动硬盘的时候,经常会出现device is busy的提示,无法写在移动设备的原因是系统中海油程序霸占的移动设备上的文件,所以我们现在要找到是那个程序在运行,所以现在可以用fuser这个命令。 Fuser可以显示出当前那个程序在使用...

  • vnc连接后只能看到终端

    2015-12-29 - 我在windows安装了VNC Viewer,远程链接ubunt12.04服务器,发现远程桌面只有一个终端,没有桌面。从网上查了一些资料,问题得以解决,记录如下: 修改~/.vnc/xstartup为: # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER u...

  • docker无法上传镜像到本地仓库

    2015-12-28 - 问题: root@ubuntu:~# docker push 192.168.19.12:5000/application/huginn The push refers to a repository [192.168.19.12:5000/application/huginn] (len: 1) unable to ping registry endpoint https://192.168.19.12:5000/v0/ v2 ping attempt failed...

  • CentOS6重启网络服务后DNS地址失效的问题

    2015-12-27 - 在之前的CentOS发行版中(4, 5) 设置DNS地址只需要在 /etc/resolv.conf 中加一行 nameserver 1.1.1.1 即可,虽然CentOS6在resolv.conf中加上这一行也管用,但是重启网络服务后,就置空了,这行消失了。 这是因为在新版本的CentOS中,如果安装过NetworkManager...

  • ctags:提示错误ctags: unrecognized option '--format=2'

    2015-12-27 - 重新安装Ubuntu系统时,用原来的备份的家目录下的.vimrc文件和.vim文件夹内的所有内来恢复vim 的使用环境,但是在使用Taglist 插件生存 tags的时候提示: Taglist: Failed to generate tags for ....(a file) ctags: unrecognized option --format=2^@^ITry...

  • bash: export: `=': 不是有效的标识符

    2015-12-27 - 如题,我要在ubuntu 下进行ARM的交叉编译,因此编辑/etc/profile,添加export PATH=$PATH:/usr/local/arm/4.3.2/bin; 可是每次进入终端都提示: bash: export: `=: 不是有效的标识符 bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sb...

  • yum出现Existing lock /var/run/yum.pid: another copy is runni

    2015-12-26 - yum出现Existing lock /var/run/yum.pid: another copy is running as pid:3355错误信息的解决办法如下: 主要原因就是yum在自动更新,只要关掉他就可以了。 解决方案: 直接输入:rm -f /var/run/yum.pid 或者:/etc/init.d/yum-updatesd stop 也可以等更新...

  • unzip命令出错 End-of-central-directory signature not found

    2015-12-25 - 解压缩出现以下错误: End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the las...

  • xshell提示:no matching outgoing encryptionxshell提示:no matching outgoing encryption

    2015-12-25 - 今天刚刚在Raspberry Pi2上装好ubuntu mate15.04,用xshell4和5连接ssh server的时候都提示,没有匹配的outgoing encryption算法,奇怪,以前安装好openssh-server都可以使用的。估计是ubuntu 15.05的openssh-server使用了不同的加密算法。 解决办法:在xshe...

  • CentOS下禁止screen建立新窗口时更改窗口尺寸

    2015-12-24 - Xshell或Putty之类的连接到Centos下使用screen时会改变窗口的尺寸,非常烦人,可以通过如下方法修改使其不更改窗口尺寸。 编辑/etc/screenrc或~/.screenrc 加入下面的代码: # Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E # (Thi...

  • 帮助谷歌Chrome提速的七个步骤帮助谷歌Chrome提速的七个步骤

    2015-12-24 - 好几个月前,我由Internet Explorer换成了火狐,原因是Internet Explorer开始变得速度缓慢,而且臃肿不堪。过了几年后,我又丢弃了火狐,改成谷歌Chrome;没错,原因你也猜到了,火狐也开始变得速度缓慢,而且臃肿不堪。 有一天,我突然认识到谷歌Chrome浏览...

  • Linux下cp: omitting directory错误解决办法Linux下cp: omitting directory错误解决办法

    2015-12-24 - 系统环境:CentOS 6.5 将写的程序复制到桌面上,运行时提示: 看文件夹上带个锁,考虑到可能是权限的问题,于是尝试将文件复制到/opt目录下,结果出现cp: omitting directory `AutoInstall_20150305的错误。 在linux下拷贝的时候有时候会出现cp:omitting dir...

  • sudo source /etc/profile提示找不到source命令

    2015-12-24 - 今天修改了/etc/profile,需要用source一下,于是写入命令: sudo source /etc/profile 提示找不到source命令。 改成:sudo . /etc/profile 还是找不到命令。 怒了,用su直接切换到root,再执行: source /etc/profile 这下成了。 Ubuntu将命令写在一个文件...

  • XShell4 SSH服务器拒绝了密码解决办法XShell4 SSH服务器拒绝了密码解决办法

    2015-12-24 - 使用XShell4连接虚拟机,以root账户登录,输入密码时服务器拒绝: sshd的设置不允许root用户用密码远程登录 修改 vim /etc/ssh/sshd_config 找到# Authentication: LoginGraceTime 120 PermitRootLogin without passwd StrictModes yes 改成 # Authenticatio...

  • gcc编译时对'xxxx'未定义的引用问题

    2015-12-23 - 在使用gcc编译的时候有时候会碰到这样的问题,编译为.o(obj) 文件没有问题,但是编译(这一步应该是链接)为可执行文件的时候会出现找不到xxx的定义的情况。 例如: g++ -o spider -rdynamic -lpthread -levent -lcrypt -ldl bloomfilter.o confparser.o crc32...

  • linux下QtCreator无法输入中文的情况

    2015-12-23 - 解决linux下QtCreator无法输入中文的情况。 安装了QtCreator5.3.1后无法输入中文,确切的说是无法打开输入法。以前使用iBus输入法的时候没有这个问题,现在使用sougou输入法才有的这个问题。 原因 有问题就得找原因,搜狗输入法是基于fcitx来做的,那么可能...

  • linux:dpkg依赖关系问题使得skype的配置工作不能继续:问题解决

    2015-12-23 - 以下为错误信息: 选中了曾被取消选择的软件包 skype。 (正在读取数据库 ... 系统当前总共安装有 159798 个文件和目录。) 正在解压缩 skype (从 skype-debian_2.0.0.72-1_i386.deb) ... dpkg:依赖关系问题使得 skype 的配置工作不能继续: skype 依赖于 lib...

  • Linux中关于权限的一个问题Linux中关于权限的一个问题

    2015-12-23 - 问题描述:一个用户组testgroup对目录/tmp/test有读,写,执行权限;用户组testuser对目录 中文件仅有读权限,且文件的属主和属组为root,当属于用户组testgroup的用户testuser登录之后用vim强行编辑后,文件的属主和属组变为testuser和testgroup,此时echo...

  • 升级Python导致yum报错

    2015-12-22 - 一天,需要在Linux服务器上面安装一个rpm包,结果运行yum命令的时候无论如何都会报错,如下: [root@test bin]# yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module name...

  • 安装Oracle时报SWAP空间不足的处理方法

    2015-12-22 - 在安装Oracle的时候,可能因为我们分配的swap空间不够导致安装失败。处理步骤如下: 1.SWAP空间为2G [root@linux01 oracle]# free total used free shared buffers cached Mem: 2039004 1207260 831744 0 22668 833660 -/+ buffers/cache: 350932 1688072 Sw...

  • python中import gevent报错:libevent version mismatch

    2015-12-20 - 环境:ubuntu14.04,python2.7 import gevent __main__:1: UserWarning: libevent version mismatch: system version is 2.0.21-stable but this gevent is compiled against 2.0.16-stable 根据提示好像是gevent和libevent的版本不和,重装libevent没有用;...

  • auto-remove后重启,没有标题栏任务栏,大部分快捷方式失效

    2015-12-20 - 环境:ubuntu14.04 卸载python3时按提示auto-remove了,重启后无标题栏任务栏,大部分快捷方式失效。 1,apt-get install ubuntu-desktop 无效 2,重启时选择ubuntu的recove模式dpkg修复 无效 3,install gnome-panel 运行gnome-panel后有任务栏,最小化等所在...

  • Input strings must be a multiple of 16 in length

    2015-12-20 - 环境:ubuntu14.04 python 描述: 测试微信开放平台中公众号第三方平台的自动回复,在对xml加密时报错。加密用的是微信给的WXBizMsgCrypt,加密类型,为aes。 1,之前xml中text信息为英文时,没有报错,改成中文时报错。 我将xml的具体内容截取出来,直接调用...

  • import TensorFlow提示Unable to load cuDNN DSO

    2015-12-20 - 系统版本:Ubuntu 15.04 Python版本:2.7 cuda版本:7.0 (输入nvcc --version可查看版本号) cuDNN版本:7.0 错误原因: 目前TensorFlow不支持7.0版本的cuDNN,最高支持cuDNN 6.5 v2。 解决方法: 下载cuDNN 6.5 v2: 前往NVIDIA官网(https://developer.nv...

  • ssh不能登陆了,openssl库冲突

    2015-12-19 - 平常没咋注意(不知道什么操作),今天不能ssh登陆centos了。 在服务端排查,说是starting sshd: OpenSSL version mismatch.Built against,唉,openssl冲突了。上网搜了一下,尝试了重新安装openssh,暂时解决了该问题。 1.删除现有的openssh #rpm -e opens...

  • ”Some Shared Libraries were not found“问题

    2015-12-19 - 安装BeyondCompare遇到了Some Shared Libraries were not found问题。 Some Shared Libraries were not found linux-gate.so.1 = (0xf77ad000) libz.so.1 = /lib/i386-linux-gnu/libz.so.1 (0xf777e000) libqtc.so.1 = /usr/lib/beyondcompare/libqtc.so.1 (...

  • tar (child): lbzip2: Cannot exec: No such file or

    2015-12-19 - 今天用tar解压缩失败了,信息如下: tar (child): lbzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now 解决方法:安装bzip2 例...

  • centos7精简安装后使用发现没有killall命令

    2015-12-19 - centos7精简安装后,使用中发现没有killall命令。 经查找,可以通过以下命令解决: yum install psmisc 简单介绍一下 psmisc: Psmisc软件包包含三个帮助管理/proc目录的程序。 安装下列程序: fuser, killall,pstree和pstree.x11(到pstree的链接) fuser 显示...

  • 28连击!打倒Linux大魔王28连击!打倒Linux大魔王

    2015-12-19 - 只需要一次次敲下退格键就够了! BACKSPACE 两位西班牙的安全研究人员发现了(http://hmarco.org/bugs/CVE-2015-8370-Grub2-authentication-bypass.html) Linux 的一个奇怪的零日安全漏洞,如果你的 Linux 使用了 GRUB2 密码保护(https://help.ubuntu.com/...

  • openstack neutron-plugin-openvswitch-agent start报错

    2015-12-19 - 版本Ubuntu 12.04 Icehouse /var/log/neutron/openvswitch-agent.log Stderr: sudo: no tty present and no askpass program specified\nSorry, try again.\nsudo: no tty present and no askpass program specified\nSorry, try again.\nsudo: no tty prese...

  • cenos7排错之yum依赖错误处理:清理重复的rpm包

    2015-12-18 - 使用fedora/redhat/centos系列的linux发行版,有时会因为某些非正常原因(异常断电居多)造成yum/rpm错误,表现是在运行yum时出现依赖包错误,仔细查看其相关包,会发现这些包是矛盾的版本号依赖。这种情况下,通常就是本机rpm数据库里记录了某个rpm包多个版...

  • Debian下签名无法验证

    2015-12-18 - 又收集到的新方法: gpg --keyserver subkeys.pgp.net --recv-keys AED4B06F473041FA apt-key add /root/.gnupg/pubring.gpg apt-get update 最新方法:apt-get install debian-archive-keyring 今天看到一个debian下的gambas软件,想试用一下,所以先找到了...

  • awk来调用linux命令解决个日志采集问题

    2015-12-18 - 背景 做了个web页面的日志查询工具,给用服同事使用,以应对服务器太多的困扰,需要将现网日志拿回来家里进行模拟。 问题 部件A有10台主机,将某小时内文件压缩为A_IP.tar.gz。每个tar.gz包解压后为201405291200.tar.gz这种包含具体日志文件的压缩包。问题是...

  • CentOS6上MongoDB连接数无法突破1000的解决办法

    2015-12-17 - 问题描述: 生产环境发现CPU满负荷运行,MongoDB的连接数始终突破不了1000。 解决方案: 1、查看mongodb的日志,报下面的错误: Wed Nov 21 15:26:09 [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable Wed Nov 21 15:26:0...

  • vsftpd 500 OOPS: cannot change directory

    2015-12-17 - 今天研究linux 的vsftpd 时发现什么都配好了,就是连不上服务器,原来是RedHad 的 SELinux 的设置问题。 vsftpd 500 OOPS: cannot change directory #ftp 127.0.0.1 Connected to 127.0.0.1 220 (vsFTPd 2.0.5) User (127.0.0.1:(root)): test 331 Please sp...

  • Linux下运行上传的Windows下编辑的*.sh文件错误记录

    2015-12-17 - 今天将Windows下编译好的 test.sh文件上传到Linux下。 用命令:chmod +x test.sh 编译运行之后一直报错,提示我: -bash: ./test.sh: /bin/bash^M: bad interpreter: No such file or directory 开始是说我权限不够, 不能执行, 接着我就把权限给改了, 就一直...

  • linux文件修改后无法保存的解决办法linux文件修改后无法保存的解决办法

    2015-12-16 - 使用普通用户编辑nginx.conf 等配置文件: 保存的时候会提示:没有Root Permission 可以用如下方法解决: 保存时加上: :w !sudo tee % 我这里有一个问题。没有配置sudo权限。 用sudo时提示xxx is not in the sudoers file. This incident will be reported....

  • win10(64bit)+vmware,U盘链接不上

    2015-12-16 - 主机环境:win10 64bit,vmware11 问题:主机连接U盘,读卡器没有问题,虚拟机连接不上。 查找了很多文章,基本都是vmware usb services服务没有开启,没有解决这个问题。 经过查找,发现是主机系统与vmware版本不匹配导致的,vmware11不支持win1064bit,将v...

  • VirtualBox虚拟机与主机ping不通

    2015-12-16 - 进入虚拟机的Ubuntu(以下简称VBUbuntu),在VBUbuntu中用ifconfig查看ip地址,在Windows7中用ipconfig查看ip地址。 在VBUbuntu中ping Win7的ip,可以ping通; 在Win7中ping VBUbuntu的ip,超时。 解决方法:在虚拟系统未打开的情况下,在设置-网络属性中设置...

  • Linux环境变量修复

    2015-12-16 - 上次因为配置环境变量,不小心在 /etc/profile 里面修改了 PATH,导致以前的 PATH丢失。结果是显然的,sudo vim 等等各种不能运行。 修复方法如下: export PATH=/bin:/sbin:/usr/bin:/usr/sbin 在终端下运行上述命令,然后修改 /etc/profile,在 export PAT...