小编Aka*_*all的帖子

Eigen 安装似乎有效,但我仍然无法使 eigen 工作

我正在尝试安装eigen,但我似乎没有让它工作。

我做了:

sudo apt-get install libeigen3-dev
Run Code Online (Sandbox Code Playgroud)

一切似乎都很好,之后

dpkg -p libeigen3-dev
Run Code Online (Sandbox Code Playgroud)

我得到:

Package: libeigen3-dev
Priority: extra
Section: libdevel
Installed-Size: 3718
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Source: eigen3
Version: 3.2.0-4
Depends: pkg-config
Suggests: libeigen3-doc
Size: 698062
Description: lightweight C++ template library for linear algebra
 Eigen 3 is a lightweight C++ template library for vector and matrix math,
 a.k.a. linear algebra.
 .
 Unlike most other linear algebra libraries, Eigen 3 focuses on the simple
 mathematical needs of applications: games and …
Run Code Online (Sandbox Code Playgroud)

c++ 13.10

9
推荐指数
2
解决办法
4万
查看次数

-std=c++11 在 gcc 4.8.1 上无法识别

我只是按照这个问题的答案将我的 gcc 版本更新到 4.8。1 在 Ubuntu 12.04 上,我认为它会支持 C++11。不过好像没有。

当我尝试使用-std=c++11标志编译某些内容时,出现此错误:

cc1plus: error: unrecognized command line option ‘-std=c++11’
Run Code Online (Sandbox Code Playgroud)

我的 gcc 版本是这样的:

gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
Run Code Online (Sandbox Code Playgroud)

我的 g++ 版本是这样的:

$ g++ -v
  ....
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Run Code Online (Sandbox Code Playgroud)

我可能会错过什么?

编辑:我错过了我需要更新 g++

通过对上述答案中提供的代码进行小幅修改,很容易实现。只需更改gccg++.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
Run Code Online (Sandbox Code Playgroud)

gcc

5
推荐指数
1
解决办法
3万
查看次数

启动并行运行的进程

我正在尝试并行启动 16 个 python 脚本。

我试着做

for i in {0..15}
    do
    python my_script.py "$i"
    done 
Run Code Online (Sandbox Code Playgroud)

但是检查我的htop这仅在一个处理器上运行。我猜这个过程是按顺序执行的。

我当然可以打开一个新选项卡并在每个选项卡中运行一个进程,但这似乎是多余的。什么是正确的方法呢?

bash process

5
推荐指数
1
解决办法
1245
查看次数

如何摆脱未知显示?

我搞乱了显示选项,严重搞砸了一些事情。现在我的显示是这样的:

在此处输入图片说明

我在显示设置中没有看到任何明显的解决方案。我怎样才能解决这个问题?我应该提供哪些额外信息?

编辑:

我跑后xrandr得到这个:

Screen 0: minimum 320 x 200, current 2390 x 768, maximum 32767 x 32767
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal …
Run Code Online (Sandbox Code Playgroud)

display 13.04

4
推荐指数
1
解决办法
5343
查看次数

标签 统计

13.04 ×1

13.10 ×1

bash ×1

c++ ×1

display ×1

gcc ×1

process ×1