当我在CLion和yocto SDK一起使用时,我有一个坏了的C编译器,但是它在eclipse Oxygen上工作得很好。这是编译器中的错误:
CMake Error at /home/developer/yocto_SDK2/toolchain2/sysroots/x86_64-pokysdk-linux/usr/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler
"/home/developer/yocto_SDK2/toolchain2/sysr
我正在使用Buildroot2018.02.7为i386 PC构建一个简单的Linux系统,作为在嵌入式ARM系统上做同样事情的先导。在构建util-linux模块时,我总是遇到这样的问题:
CC lib/libcommon_la-path.lo
lib/pager.c:11:17: fatal error: err.h: No such file or directory
#include <err.h>
^
compilation terminated.
Makefile:8596: recipe for target
我最初设法让我的tp链接弓箭手T2U在我的机器上工作,但在我安装了一些显示驱动程序之后,它似乎决定停止工作,但不确定原因。我试着重新安装驱动程序,但这似乎不起作用.
我是Linux新手,所以不太确定我在做什么
编辑: lsusb的输出
Bus 003 Device 002: ID 0bda:0161 Realtek Semiconductor Corp. Mass Storage Device
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux
当我试图安装python-gtk2-dev时,我会收到以下消息:
~$ sudo apt-get install python-gtk2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpaps0 linux-headers-4.4.0-51 linux-headers-4.4
我有一个拥有50多台不同Linux机器(刀片机)的系统,其IP范围如下
165.23.1.21-165.23.1.64 ( each Linux machine have 4 eth - eth1,2,3,4)
通过LANS电缆连接到4个Cisco交换机的系统
我的目标是验证Linux机器中的每个eth是否连接到交换机中的哪个端口。
例如
./我的工具
machine1 results
linux_machine1_eth0 connected to switch_1_port_15
linux_machine1_eth1 connected to swi
在Ubuntu18.04上,当我想安装推荐的Nvidia驱动程序时,我会得到这个。
sudo apt install nvidia-340
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libargtable2-0 libass5 libavcodec-ffmpeg56 libavdevi
这是我的样本文件
user@linux:~$ cat file.txt
Line 1
Line 2
Line 3
Line 4
Line 5
user@linux:~$
我可以用grep -A2 'e 2' file.txt打印第2-4行。
user@linux:~$ grep -A2 'e 2' file.txt
Line 2
Line 3
Line 4
user@linux:~$
我也可以用grep -n打印出行号。
user@linux:~$ grep -nA2 'e 2' file.txt
2:Line 2
3-Line 3
4
在编译包含没有open("FILENAME", O_RDONLY);标志的-O2的文件时,一切都很好。但是,当-O2被打开时,我得到:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h: In function ‘open’:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:44:7: error: invalid use of ‘__builtin_va_arg_pack_len ()’
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:45:26: error
如果我运行cat file1.txt,我有:
linux mint
ubuntu
cent-os
fedora
debian
kali linux
arch linux
kubuntu
open suse
deepin
parrot os
然后cat file2.txt给出:
linux mint
cent-os
fedora
kali linux
arch linux
kubuntu
open
deepin
parrot
ubuntu
debian
但是,如果我想要像这样输出呢?
file1.txt file2.txt
linux mint
linux命令"lsof“返回正在访问的文件,我在shell中尝试使用vi打开一个文件,用kwrite打开另一个文件,然后返回并得到vi的进程,但没有kwrite进程,如下所示
[linux@localhost shell_ex]$ lsof +d .
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 3458 linux cwd DIR 253,2 50 953101 .
bash 3747 linux cwd DIR 253,2 50 95
我希望将输出保存到文件中,同时,我也希望看到屏幕上的进度。
基本上,tee只为一行工作。有什么解决办法吗?
[user@linux ~]$ cat -n test.sh
1 echo line 1 | tee out.txt
2 echo line 2 | tee out.txt
3 echo line 3 | tee out.txt
4 ls -lh out*
[user@linux ~]$
[user@linux ~]$ ./test.sh
line 1
line 2
line 3
-rw-r--r-- 1 user user 7 M
我想解压缩一个文件,我写了这个命令:
bunzip2 linux-source-4.15.0.tar.bz2
我得到了这个:
bunzip2: Input file linux-source-4.15.0.tar.bz2 is not a normal file.
我想知道到底是什么问题。
我运行了linux-source-4.15.0.tar.bz2文件,得到:
linux-source-4.15.0.tar.bz2: symbolic link to linux-source-4.15.0/linux-source-4.15.0.tar.bz2