#Ubuntu# apt-get issuse 小记

numpy

Ubuntu 的 apt-get 虽然很安逸,但对与一些开发工作来说就是场噩梦,昨天刚发现,julia官方已经不支持Ubunt社区安装了。
不仅更新慢,而且功能完整性也没保障...orz
比如numpy(via: apt-get install python-numpy):

import numpy as np
np.random.choice

然后就报错,说没有module。查到官网上

New in version 1.7.0.

然后就查看了下自己的版本:

np.__version__
#'1.12.1'

我想应该是版本吧,先apt-get, 说已经是最新版了,然后我想先卸载,然后用pip
结果pip装上能用了,再查版本:

np.random.choice
#<built-in method choice of mtrand.RandomState object at 0x95d2aa4>
np.__version__
#'1.12.1'

无话可说。。。

g++-6

Ubuntu 14.04 和 12.04 下似乎默认没有g++-6,安装的时候需要添加源:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ...

启动失败

这个标题看起来有些见鬼...就是输入apt-get 也会报错那种:

chen-k@chenk-System-Product-Name:~$ sudo apt-get install g++
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu1404_x86%5f64_en
E: The package lists or status file could not be parsed or opened.

#  换个 aptitude 也一样。。。
chen-k@chenk-System-Product-Name:~$ sudo aptitude install g++
[ ERR] Reading package lists
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu1404_x86%5f64_en
E: The package lists or status file could not be parsed or opened.
[ ERR] Reading package lists
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu1404_x86%5f64_en
E: The package lists or status file could not be parsed or opened.

参照他人解决,这里转记了下:

sudo rm -vf /var/lib/apt/lists/*
sudo apt-get update

转载于:https://www.cnblogs.com/chenyliang/p/6789032.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值