zoukankan      html  css  js  c++  java
  • #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
    
  • 相关阅读:
    常用语句
    html引入ECharts的两种方式
    最新版Navicate破解激活
    买路由器篇
    关于java8(Stream)的一些用法
    Mybatis联合查询记录,左连接参数操作
    海淘转运事宜记录
    mysql where语句多条件查询是and和or联合使用bug
    关于mysql中GROUP_CONCAT函数的使用
    关于MySQL存入的时间和取出时间不一致的解决
  • 原文地址:https://www.cnblogs.com/chenyliang/p/6789032.html
Copyright © 2011-2022 走看看