由买买提看人间百态

topics

全部话题 - 话题: usr
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
G**Y
发帖数: 33224
1
【 以下文字转载自 Joke 讨论区 】
发信人: xniteman (The Perfectionist), 信区: Joke
标 题: 一个空格引发的惨剧(多图)
发信站: BBS 未名空间站 (Mon Jun 20 09:55:45 2011, 美东)
你是否相信如果你的程序里没有检查一个变量会导致怎么系统瘫痪?这样的事昨天在发
生,今天同样在发生。Unix40多年了,在这40年里,程序员发生过各种各样的的惨剧,
但是大多数的事情一而再再而三的重演。
今天的你,可能在开发者各种各样NB的系统,你会相信你的一个空格也能导致系统瘫痪
吗?也许你可能很难相信这个事。不过,再下面这个事将告诉你这个血淋淋的事实 —
— 一个空格产生的bug可以让你的系统瘫痪。
bumblebee是一个开源项目,这个名字也就是变形金刚里的大黄蜂,这个项目是这样介
绍自己的——
bumblebee is Optimus support for Linux, with real offloading, and not
switchable graphics.. More important.. it work... 阅读全帖
e**********y
发帖数: 128
2
接着问。
我今天按照ubuntu官方的说明准备了一个USB stick (http://www.ubuntu.com/download/ubuntu/download)。我在mac上制作的USB stick。
我的linux机器BIOS里设置USB启动(启动第一优先级),linux机器系统版本是Red Hat
Enterprise 5.X。
问题是USB启动不起来? 我觉得USB stick制备应该没问题(虽然我没有在mac上测试过
能否在mac上USB启动)。我觉得是我的linux机器有问题。
第二个问题是:
linux上的yum坏了。我今天想升级一下我的yum,下载了一个yum-3.4.3,结果在make的
过程中出错。最终结果是现在yum 用不了了,我在终端里输入yum,回车
得到如下输出:
Traceback (most recent call last):
File "/usr/bin/yum", line 28, in ?
import yummain
File "/usr/share/yum-cli/yummain.py", line 32, in ?
... 阅读全帖
s****l
发帖数: 10462
3
Nice!
Here is what I got, it looks all good until "cannot....", which I marked
with ~~~~~~~~~ signs.
Executing: program /usr/bin/ssh host 10.33.60.69, user tony.xu, command scp
-v -t ~
OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 10.33.60.69 [10.33.60.69] port 22.
debug1: Connection established.
debug1: identity file /home/txu/.ssh/identity type -1
debug1: identity file /home/... 阅读全帖
w*s
发帖数: 7227
4
来自主题: Linux版 - anyone used lighttpd before ?
this is the part i don't get,
say lighttpd is running in the embedded linux,
in my windows pc, how to load the static page.
if in the lighttpd.conf i have
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
then in IE in windows i type 127.0.0.1 ?
many thanks !
w*s
发帖数: 7227
5
来自主题: Linux版 - Q on dhcp for ubuntu
/etc/dhclient.conf r,
/usr/share/synce-hal/dhclient.conf r,
./apparmor/init/network-interface-security/sbin.dhclient3
# This is a sample configuration file for dhclient. See dhclient.conf's
./dhcp3/dhclient.conf
grep: ./blkid.tab: No such file or directory
/etc/dhclient.conf r,
/usr/share/synce-hal/dhclient.conf r,
./apparmor.d/sbin.dhclient3
what are these apparmor files pls ?
j**u
发帖数: 6059
6
终于找出原因了。我在.bashrc和/etc/environment都设置了环境变量,都不行。后来
google发现原来点击桌面matlab icon启动matlab的时候,matlab会在一个non-
interactive shell里面启动,不会读取设定的环境变量。但是只要把icon对应的命令
前面再设置一下环境变量,就可以了。也就是把
/usr/bin/matlab -deskop 变成
env YOUR_ENVIRONMENTAL_VARIABLE=XXX /usr/bin/matlab -desktop
这个问题mac下面也有,我也是在macrumor论坛看到有人解释原因的。
u**l
发帖数: 2335
7
哦,可以这样啊,那他的安装脚本把kernel flash进nand是什么意思呢?
呵呵,我是linux新新手,请多指教哈:
########
## flash kernel
########
echo "# Flashing Kernel..."
echo "# - @ 0x500000"
/usr/sbin/nandwrite -p -s 0x500000 /dev/mtd1 /tmp/usb/boot/uImage.(no)pci
echo "# - @ 0xB00000"
/usr/sbin/nandwrite -p -s 0xB00000 /dev/mtd1 /tmp/usb/boot/uImage.(no)pci
echo "# Done Flashing Kernel"
f******y
发帖数: 2971
8
来自主题: Linux版 - 包子求助,unity启动不了了
错误信息在这里:
unity-panel-service: no process found
compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libccp.so' :
libprotobuf.so.7: cannot open shared object file: No such file or directory
compiz (core) - Error: Couldn't load plugin 'ccp'
compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libccp.so' :
libprotobuf.so.7: cannot open shared object file: No such file or directory
compiz (core) - Error: Couldn't load plugin 'ccp'
z********0
发帖数: 9013
9
来自主题: Linux版 - 请问一个HDMI连电视的问题
郁闷了,我在UDEV的Hook里调用xrandr, 发现xrander返回:can't open display
cat monitor-hotplug.rules
KERNEL=="card0", RUN+="/myconfigs/hotplug_tv.sh"
cat hotplug_tv.sh
#!/bin/bash
d=`date`
log=/myconfigs/a.log
echo "$d: TV connected" > $log
sleep 20
/usr/bin/xrandr --output HDMI2 --mode 1920x1080
/usr/bin/xrandr >> $log
echo "xrandr output $?" >> $log
w*s
发帖数: 7227
10
just create a dummy c++ project, build ok, run ok.
hit F5 to debug, it says “Don’t know how to attach”.
1. Qt creator 2.4.1, it says based on Qt 4.7.4
2. /usr/lib/qmake-qt4 -v says using qt version 4.6.2 in /usr/lib
3. ubuntu, don’t know which version, uname -a says “62-ubuntu SMP … UTC
2011”
i’ve been coding for many years, mostly command line in linux, and windows.
spent 2 nights cannot solve this, trying to do updates, ubuntu keeps on
giving me error.
sigh, i don’t know what to say,
linux is ... 阅读全帖
w*m
发帖数: 1806
11
来自主题: Linux版 - zoneinfo在哪儿?
我的ASUS RT-N16上运行着tomato firmware,Linux的,可是在/usr/share/下没有
zoneinfo目录。请问系统的zoneinfo在哪里?有没有安装包可以安装吗?
thx
root@unknown:/tmp/etc# cd /usr/share
root@unknown:/tmp/share# ls
root@unknown:/tmp/share# ls -lsrt
root@unknown:/tmp/share#
s******s
发帖数: 505
12
来自主题: Linux版 - 找不到共享文件库的问题
I installed a file manager. When I tried to start the application,
it complained:
>error while loading shared libraries: libidn.so.11:
>cannot open shared object file: No such file or directory
If I do ldd, it says not found:
>libidn.so.11 => not found
However,
>locate libidn.so.11
>/usr/lib64/libidn.so.11
>/usr/lib64/libidn.so.11.6.9
怎么办?谢谢!
c********g
发帖数: 1173
13
来自主题: Linux版 - 问个nginx rewrite的问题
现在要把URL:http://www.example.com/product/product-name/1234 forward到:http://www.example.com/details/product.jsp?pid=1234,希望用户端browser里看到的URL仍是第一个。我用了这个rewrite rule:
rewrite ^/product/(.*)/(\d+)$ /details/product.jsp?pid=$2;
但是,在product.jsp里,有一个指向css文件的连接:

bootstrap.css 所在目录是: /usr/share/nginx/www/docs/assets/css/ . 当我用了
上面的rewrite rule之后,root directory不知问什么就变成了 www/product, 所以
在 details/product.jsp里 bootstrap.css 的连接就变成了:
/usr/share/n... 阅读全帖
r***l
发帖数: 45
14
来自主题: Linux版 - 问个 python 问题
我的程序找不到 numpy :
ImportError: No module named numpy
但是我发现我的numpy 已经安装了,
/usr/include/python2.6/numpy
/usr/include/python2.7/numpy
我的python 也有2。6 和2。7 两个version.
是不是两个version 不知道选哪个呢?
这个问题怎么解决呢?
z****u
发帖数: 3461
15
来自主题: Linux版 - debian cron到底怎么弄?
你真的装了cron吗。。。
$ dpkg -S /etc/crontab
cron: /etc/crontab
$ dpkg -S /usr/bin/crontab
cron: /usr/bin/crontab
如果以上两个文件都存在的话,看看下面这个
http://askubuntu.com/questions/337204/cron-daily-jobs-not-runni

daily
d********g
发帖数: 10550
16
来自主题: Linux版 - 吼一声:FreeBSD不错啊
虽然这里是Linux版,但是FreeBSD真的不错,值得推广
2014年底发布的10.x版添加了新的pkg(pkgng)管理二进制包,旧的pkg_*全部淘汰,
再也不用啥都从Ports编译了
Gentoo若干年前因为山寨Ports的Portage火了一把,现在也不行了。从源码编译实在蛋疼
Debian因为稳定著称,但是stable的包都很老。CentOS/RHEL系就更不用说了
为啥Ubuntu LTS那么多公司部署?其实Ubuntu安全性、稳定性真不如Debian,就是因为
小白鼠多,出了事有人垫背,一荣俱荣一损俱损,运维在心理上有安全感一些。说通俗
点就是抱团取暖
Arch真心爽,只有真正坚强的运维才敢上。pacman行云流水,ABS也能个人定制编译
再说FreeBSD,以前就靠Ports主力,在9.x的时候pkg_*还没啥可用的。现在pkg就不同
了,基本上什么package都有现成的,版本比Ubuntu LTS新太多了,我感觉在一定程度
上甚至都可以和Arch相提并论了。pkg就是pacman的定位,Ports的质量控制又甩社区
ABS十条街
FreeBSD一个很好的设计就是系... 阅读全帖
K*******n
发帖数: 607
17
来自主题: Linux版 - Fedora 有个疑惑
在Fedora下,通过DNF安装package都是需要密码的,而且都是进root下的/usr/bin,难
道这种比较fancy的方式不装到root下吗?可是我自己帐户的/home/user下面没有阿,
还是在/usr/bin下面
d********g
发帖数: 10550
18
来自主题: Linux版 - FreeBSD越来越好用了
这就是完全不了解FreeBSD的ports/pkg系统了。我说了那么多次,FreeBSD官方都是多
版本app支持的,你需要装哪一个都行,distrowatch上显示的只是每个branch支持的最
高package版本而已
举个例子:
$ uname -a
FreeBSD xxxxxx 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 12:23:
44 UTC 2016 [email protected]/* */:/usr/obj/usr/src/sys/
GENERIC amd64
$ freebsd-version
10.3-RELEASE-p6
$ pkg search postgresql9 | grep server-
postgresql90-server-9.0.23 The most advanced open-source database
available anywhere
postgresql91-server-9.1.22 The most advanced ... 阅读全帖
d********g
发帖数: 10550
19
来自主题: Linux版 - FreeBSD越来越好用了
再来看看几个流行的吧:
$ pkg search mysql5 | grep server
mysql55-server-5.5.50 Multithreaded SQL database (server)
mysql56-server-5.6.30 Multithreaded SQL database (server)
mysql57-server-5.7.13 Multithreaded SQL database (server)
$ pkg search mariadb | grep server
mariadb100-server-10.0.26 Multithreaded SQL database (server)
mariadb101-server-10.1.14 Multithreaded SQL database (server)
mariadb55-server-5.5.50 Multithreaded SQL database (server)
$ pkg search ^php... 阅读全帖
m********5
发帖数: 17667
20
因为大部分用户是单机用户
我在server version,是711, 也可能是我设置了umask所以会这样
在现代桌面用户中,大量存在诸如/home/usr/public 之类的share folder, 所以/home
/usr 设置为700一般是不可能的。默认设置成700就意味着用户需要了解很多比较基本
的*unix知识,在自己需要的时候修改这些权限。 ubuntu以windows和android用户为最
大受众, 这么做是自寻死路。
c**t
发帖数: 2744
21
来自主题: Programming版 - Ask a g++ compilation qestion
g++ 3.2 就没有问题。3.4怎么不行?
$ make -f makefile all
rm -f ../../../../programs/libraries/libxmlparse.a
g++ -qmkshrobj -o ../../../../programs/libraries/libxmlparse.so ../../../../programs/libraries/static/libxmlparse_s.a
-blibpath:./programs/libraries:/usr/lib/threads:/lib:/usr/lib:/lib:/software/ace/ACE_wrappers/ace
-L/lib -ldl -lpthreads -ltli_r -lC_r
g++: `-b' must come at the start of the command line
make: *** [../../../../programs/libraries/libxmlparse.a] Error 1
$ g++ --version
g++
s*j
发帖数: 7
22
来自主题: Programming版 - SIGSEGV,Segmentation fault in Cygwin
【 以下文字转载自 Unix 讨论区 】
发信人: sjj (漂), 信区: Unix
标 题: SIGSEGV,Segmentation fault in Cygwin
发信站: BBS 未名空间站 (Thu Aug 2 18:48:03 2007), 转信
在xp下装了一个Cygwin,用gdb debug一个小例子程序,设了断点后,就出现了上面的错
误。。Program received signal SIGSEGV, Segmentation fault. 这个程序拿到其他装
Cynwin的机子上debug,没有什么问题。
google了一下这个问题,看到说 You need to simplefy your PATH. The main probl
em you're having is that you're
mixing UNIX TOOL PACKAGES. 建议add `export
PATH=/bin:/usr/bin:/usr/local/bin:/what/ever/other/paths:." to your ~/.bashr
c file。加了以后,好
h***s
发帖数: 19
23
来自主题: Programming版 - C++: 下面代码有啥问题,为什么?
/usr/include/c++/3.2.3/bits/stl_deque.h:676: forming reference to reference
/usr/include/c++/3.2.3/bits/stl_deque.h:676:: Too many arguments
r*****l
发帖数: 2859
24
来自主题: Programming版 - 问一个link的问题
解决了。谢谢。
原来需要的是/usr/lib64下面的libstdc++.so.5。只装了/usr/lib。
r****t
发帖数: 10904
25
来自主题: Programming版 - repast 请进: python debian安装问题
改了 /usr/share/python/debian_defaults 了没有?
你看看 the Exceptions thrown when import, is it referring to
/usr/lib/python2.4/site-package/... or not?
最好把 Exception 贴出来。
b*********7
发帖数: 12
26
来自主题: Programming版 - C Library (一个统计方面的) 安装一问
最近要做统计方面的一个 project,需要用到该领域一牛人用的C code,首先就要安装
他给的library, 链接如下:http://www.math.ntnu.no/~hrue/GMRFLib/
需要下载的是GMRFLib-3.0-0-snapshot.tgz, 在unix下解压以后没法安装,我对unix
不是很熟悉,发信问原作者没有回应,请各位牛人帮忙看看。
cd 到解压文件夹以后,运行make出现很多错误如下:(
Makefile在解压文件夹里,哪位好心人给看看,帮了我大忙了,在此先提前谢了!!)
bash-2.05b$ make
gcc -g -Wall -O3 -fomit-frame-pointer -fexceptions -funroll-loops -DHAVE_
INLINE -I.. -DGMRFLib_PATH=\"/usr/local/doc/GMRFLib/data\" -I/usr/local/
include -c -o problem-setup.o problem-setup.c
In file included from problem-
t****t
发帖数: 6806
27
来自主题: Programming版 - Python problem on 64 bit Linux
what's the difference...? you can do this on any 64-bit linux by specify the
same configure cmdline, while setting environment "CC=gcc -m32".
BTW, I remember the /usr/local/lib always has 32-bit libraries by default.
64-bit libraries stayes in /usr/local/lib64. You can check with "file".
y****i
发帖数: 23
28
来自主题: Programming版 - 问个关于linux下面netpbm的问题
操作系统:linux
程序C编的,用了netpbm的函数,编译没有问题,运行的时候报错:
error while loading shared libraries: libnetpbm.so.10: cannot open shared
object file: No such file or directory
查了一下netpbm的位置:
[]$ netpbm-config --version
Netpbm 10.26
[]$ netpbm-config --datadir
/usr/local/lib
[]$ netpbm-config --bindir
/usr/local/bin
================
能告诉我这是怎么回事么?怎么解决?多谢
F*******i
发帖数: 190
29
来自主题: Programming版 - python module build problem:
the compiling of the numpy module complains:
/usr/bin/ld: cannot find -lptf77blas
I am wondering whether there is any option to add for the gcc search path?
the current gcc search path like:
-L/usr/local/lib
How can I add another search path like -L/my/local/lib ?
many thanks!
j***y
发帖数: 2074
30
来自主题: Programming版 - stdbool.h及其他
C里面是没有bool这个类型的,直到C99出现之后。
我发现系统中有stdbool.h这个header,但是gnu c library里面没有:
---
qxu@gso-linuxcom-01(pts/49):~/opensrc/glibc-2.11[120]> locate stdbool.h
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include/stdbool.h
/usr/lib/gcc-lib/i386-redhat-linux7/2.96/include/stdbool.h
/lib/ssa/gcc-lib/i386-redhat-linux-gnu/3.5-tree-ssa/include/stdbool.h
/export/WindRiver/3.0/bellona/0.02/toolchain/x86-linux2/lib/gcc/powerpc-wrs-
linux-gnu/4.3.2/include/stdbool.h
/export/WindRiver/3.0/bellona/0.02/toolchain/x86-lin
j****i
发帖数: 305
31
来自主题: Programming版 - g++ compilation problem in linux
When I compile using g++, it does not report any errors, but no target is
generated either.
When I ran the following command in my Mac, it compiles and everything is
good:
g++ -O3 -L/usr/local/lib -L/gpfs/fs4/home/lcgonzal/boost/lib -L../../../ -I
../../.. -I/gpfs/fs4/home/lcgonzal/boost/include test_ctf.cpp -o bin/test_
ctf -lgonzal
But the same command does not generate the bin/test_ctf executable at all in
linux.
When I put the -v option like this:
g++ -O3 -L/usr/local/lib -L/gpfs/fs4/home
j**f
发帖数: 28
32
来自主题: Programming版 - 求助: Cygwin GCC g77编译.f文件出错
The two functions are not implemented in g77/gfortran
the detail of the function can be found here
http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/p_man/cat3/f90/JIAND.z
http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/p_man/cat3/f90/JISHIFT.z
Most likely you can just use IAND and ISHIFT to substitute them.
The two were implemented in ifort, so you can try to see if the substitution
change results. I don't kno
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)