草庐IT

directories

全部标签

c - `bash: ./a.out: No such file or directory` 运行由 `ld` 生成的可执行文件

这是C语言的HelloWorld代码://a.c#includeintmain(){printf("Helloworld\n");return0;}我将其编译为gcca.c,它按预期生成a.out并且./a.out打印Helloworld...正如预期的那样。现在,如果我分别进行编译和链接:gcc-ca.c;ld-lca.o,它运行生成为./a.out的a.out我收到消息:bash:./a.out:Nosuchfileordirectory我用Google搜索了那个错误,似乎当生成的可执行文件是32位ELF而机器架构是64位时会发生这种情况。我正在运行64位机器并运行filea.ou

android - ./快速启动 : No such file or directory

我已经为此苦苦挣扎了一段时间!我在用头撞墙。我正在尝试运行fastboot(android-linux-tools/platform-tools/fastboot),但我收到了一条Nosuchfileordirectory消息。我在ubuntu12.04x64上。我不是linux新手,我很困惑。$cd~/android-sdk-linux/platform-tools$./fastboot-bash:./fastboot:Nosuchfileordirectory$./adbdevices-bash:./adb:Nosuchfileordirectory$ls-la...-rwxrwx

c - 纯 C : opening a directory with fopen()

我有一个程序可以打开文件并检查其长度。FILE*fd=fopen(argv[1],"rb");fseek(fd,0,SEEK_END);size_tflen=ftell(fd);if(flen==((size_t)-1)){printf("%sisadirectory.\n",argv[1]);fclose(fd);exit(1);}现在,至少在Linux下,fopen()在打开目录时会返回一个有效的文件描述符。这导致查找操作返回-1(或者,由于size_t是无符号的,0xFFFFFFFFFFFFFFFF=264-1在64位系统上)。不幸的是,上面代码中的条件(flen==((size

c++ - Linux/C++ : getting user's directory without leaks

下面的代码只是试图读取用户的主目录,但存在内存泄漏,我做错了什么?staticstd::stringgetHomeDir(){structpasswd*pw=getpwuid(getuid());std::stringres(pw->pw_dir);endpwent();returnres;}valgrind提示:==32757==160(40direct,120indirect)bytesin1blocksaredefinitelylostinlossrecord42of48==32757==at0x402BB7A:malloc(in/usr/lib/valgrind/vgprelo

ruby-on-rails - 参数错误 : parent directory is world writable but not sticky (bundle install)

Linktogithubforerrorprintout当我尝试捆绑安装时,我收到上述错误。我已经尝试了其他帖子的建议,但github社区不知道答案。我正在运行Arch并在我的shell中使用zsh。更新环境:Bundler1.12.5Rubygems2.5.1Ruby2.3.1p112(2016-04-26revision54768)[x86_64-linux]GEM_HOME/usr/lib/ruby/gems/2.3.0GEM_PATH/usr/lib/ruby/gems/2.3.0:/home/.gem/ruby/2.3.0Git2.8.3open_gem(1.5.0)提前致谢

linux - libpulse.so.0 : cannot open shared object file: No such file or directory

我在尝试安装服务器时遇到此错误。libpulse.so.0:无法打开共享对象文件:没有那个文件或目录我运行了一个ldd,并且有libpulse.so.0,但是脚本不支持它root@mas:~/Velneo-vServer#sudosh./vServer.sh-i./vServer:errorwhileloadingsharedlibraries:libpulse.so.0:cannotopensharedobjectfile:Nosuchfileordirectoryroot@mas:~/Velneo-vServer#ldd`whichpulseaudio`linux-vdso.so.

linux - 在 bash 脚本中查找命令导致目录出现 "No such file or directory"错误?

2014年3月21日更新所以我意识到我没有尽可能高效,因为我需要“清理”的所有磁盘都在/media下并命名为“disk1,disk2,disk3等”这是最终脚本:DIRTY_DIR="/media/disk*"find$DIRTY_DIR-depth-typed-name.AppleDouble-execrm-rf{}\;find$DIRTY_DIR-depth-typed-name.AppleDB-execrm-rf{}\;find$DIRTY_DIR-depth-typed-name.AppleDesktop-execrm-rf{}\;find$DIRTY_DIR-typef-na

Linux 狂欢 : Move multiple different files into same directory

作为一个相当新手的Linux用户,我似乎无法找到如何做到这一点。我正在尝试将一个目录中的所有唯一文件移动到另一个目录中。示例:$lsvehiclecar.txtbicycle.txtairplane.htmltrain.docx(morefiles)我想要车内的car.txt、bicycle.txt、airplane.html和train.docx。现在我通过单独移动文件来做到这一点:$mvcar.txtvehicle$mvbicycle.txtvehicle...如何在一行中完成此操作? 最佳答案 你可以做到mvcar.txtbi

linux - RTNETLINK 回答 : No such file or directory

当我运行这个命令时:tcqdiscadddeveth0rootredlimit51200000min128000max512000avpkt1024burst200ecnprobability0.5我明白了RTNETLINKanswers:Nosuchfileordirectory我已经为netfilters配置了内核,并且在menuconfig中配置了所有网络选项。我不明白为什么会出现这个错误。我正在使用iproute2-2.6.23和Fedora8。这在我的笔记本电脑上运行良好,但在我的台式电脑上运行不正常? 最佳答案 错误可能

linux - g++ conio.h : no such file or directory

我正在尝试使用g++编写一个程序,该程序使用conio.hheader。我实际上想做的是调用我在Borland编译器和Windows操作系统中使用的gotoxy函数。所以第一个问题是:在g++中是否有gotoxy函数或等效函数?第二:为什么我不能包含conio.h?我读了一些东西说我应该安装libstdc++包,我试过了,但似乎我已经有了它(它伴随着gcc)。 最佳答案 g++没有直接的等价物。conio.h特定于某些DOS编译器。但是你可以使用ncurses库来得到你想要的,它的功能与conio.h中的类似。这是一个非常详尽的教程