在Ubuntu上安装pyenv 相关问题Common build problems
Requirements:
- Ubuntu/Debian:
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
- Fedora/CentOS/RHEL:
FIXME: you may need to install xz to build some CPython version
yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
- Mac OS X:
brew install readline xz
NOTE: libssl-dev is required when compiling Python, installing libssl-dev will actually install zlib1g-dev, which leads to uninstall and re-install Python versions (installed before installing libssl-dev). On Redhat and derivatives the package is named openssl-devel.
Removing a python version
rm -rf ~/.pyenv/versions/2.7.5
Installing a 32 bit python on 64 bit Mac OS X (this will not work on Linux)
CONFIGURE_OPTS="--with-arch=i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" python-build options
Installing a system-wide Python
If you want to install a Python interpreter that's available to all users and system scripts (no pyenv), use /usr/local/ as the install path. For example:
sudo python-build 3.3.2 /usr/local/
Make your pythons a little faster
You can set your CFLAGS to accepted safe values to help get a little more speed.
CFLAGS='-O2'
Build failed - bad interpreter: Permission denied
If you encounter this error while installing python and your server is a VPS, the /tmp directory where python-build download and compile the packages is probably mounted as noexec. You can check with your hosting provider if wether they provide a way to bypass this protection.
If the answer is no, just set the $TMPDIR environment variable to wherever you have a write + execution rights. For example:
export TMPDIR="$HOME/src"
Please note you'll have to do it every time you'll want to install a new version of python unless you write this command in your ~/.bashrc.
Build failed
If you've got something like that:
$ pyenv install 2.7.5
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4... BUILD FAILED
Please, be sure to have "make" installed ($ sudo apt-get install make). On Ubuntu Server, by default, it doesn't.
Build failed: "ERROR: The Python zlib extension was not compiled. Missing the zlib?"
Installing Python-2.7.7... ERROR: The Python zlib extension was not compiled. Missing the zlib? Please consult to the Wiki page to fix the problem.
https://github.com/yyuu/pyenv/wiki/Common-build-problems BUILD FAILED
- On Mac OS X 10.9, 10.10 and 10.11 you may need to set the CFLAGS environment variable when installing a new version in order for configure to find the zlib headers (XCode command line tools must be installed first):
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.7
- Alternatively, try reinstalling XCode command line tools for your OS (especially if you just upgraded your OS)
xcode-select --install
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
- If you have homebrew openssl and pyenv installed, you may need to tell the compiler where the openssl package is located:
CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.4.3
or (checked on RHEL6):
CFLAGS=-I/usr/include/openssl \
LDFLAGS=-L/usr/lib64 \
pyenv install -v 3.4.3
- Alternatively, if you installed openssl with macports, use the following paths:
CFLAGS="-I/opt/local/include/" \
LDFLAGS="-L/opt/local/lib/" \
pyenv install -v 3.4.3
- On FreeBSD 10-RELEASE and 11-CURRENT, you may need to recompile
security/opensslwithout SSLv2 support. (See #464).
python-build: definition not found
To update your python-build definitions:
If you have python-build installed as an pyenv plugin:
$ cd ~/.pyenv/plugins/python-build && git pull
在Ubuntu上安装pyenv 相关问题Common build problems的更多相关文章
- 在Ubuntu上安装pyenv
因为找到一个域名枚举的脚本使用Python3编写的,而我一直习惯的是使用Python2.7,在自己的Windows7上再安装个Python怕混了,于是想着在VPS上装个Python的版本管理工具,也方 ...
- 在ubuntu上安装pyenv出现的问题
1.安装完pyenv时,并没有出现问题.但在安装python3.6.1时报错: ERROR: The Python ssl extension was not compiled. Missing th ...
- ubuntu上安装mysql 编译安装
为什么要折腾?首先说明的是ubuntu上安装mysql等软件是非常容易简单的,其简单的程度盖过windows上的安装,一句sudo apt-get install就可以搞定.如果想用最简便的方法安装m ...
- 使用PPA在Ubuntu上安装php5.4~5.6,7
使用PPA在Ubuntu上安装php5.4~5.6,7 sudo apt-get install software-properties-common sudo add-apt-repository ...
- 在 Ubuntu 上安装 TensorFlow (官方文档的翻译)
本指南介绍了如何在 Ubuntu 上安装 TensorFlow.这些指令也可能对其他 Linux 变体起作用, 但是我们只在Ubuntu 14.04 或更高版本上测试了(我们只支持) 这些指令. 一 ...
- 在Ubuntu上安装openResty #1
在Ubuntu上安装openResty #1 OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库.第三方模块以及大多数的依赖项.用于方 ...
- [异常解决] ubuntu上安装JLink驱动遇到的坑及给后来者的建议
一.前言 最近将整个电脑格式化,改成了linux操作系统 希望这样能让自己在一个新的世界探索技术.提升自己吧- win上的工具用多了,就不想变化了- 继上一篇<ubuntu上安装虚拟机遇到的问题 ...
- Ubuntu上安装Robomongo及添加到启动器
到目前为止,Robomongo仍是MongoDB最好的客户端管理工具,如需在Ubuntu上安装Robomongo,可直接从官网下载.tar.gz压缩包进行解压,然后直接运行bin目录下的robomon ...
- 在 Ubuntu 上安装 Android Studio
在 Ubuntu 上安装 Android Studio http://www.linuxidc.com/Linux/2013-05/84812.htm 打开terminal,输入以下命令 sudo a ...
随机推荐
- 灵书妙探第八季/全集Castle迅雷下载
英文全名Castle,第8季(2015)ABC.本季看点:<灵书妙探>讲述性格和背景迥异的两人在不断的斗嘴与摩擦中竟然渐渐培养出了默契,成了名符其实的最佳搭档.在上季Richard Cas ...
- Android 常用的数据加密方式
前言 Android 很多场合需要使用到数据加密,比如:本地登录密码加密,网络传输数据加密,等.在android 中一般的加密方式有如下: 亦或加密 AES加密 RSA非对称加密 当然还有其他的方式, ...
- Scrollbar中滚动条的设置
insideOverlay 默认值,表示在padding区域内并且覆盖在view上 insideInset 表示在padding区域内并且插入在view后面 outsideOverlay 表示在p ...
- Shape 各种属性详解
本文来自:http://blog.csdn.net/brokge/article/details/9713041 简介: 作用:XML中定义的几何形状 位置:res/drawable/文件的名称.xm ...
- 【转】group_concat函数详解
转自: http://hchmsguo.iteye.com/blog/555543 问了好多人,都不知道group_concat这个函数. 这个函数好啊,能将相同的行组合起来,省老事了. MySQL中 ...
- Servlet与JSP的区别(转)
原文链接:Servlet与JSP的区别 两者之间的联系和区别 [1]JSP第一次运行的时候会编译成Servlet,驻留在内存中以供调用. [2]JSP是web开发技术,Servlet是服务器端运用的小 ...
- 使用TortoiseSVN的客户端钩子脚本触发Jenkins构建
我们项目在开发过程中使用了Jenkins构建Windows版本,为了通过自动触发使构建的版本保持最新,可以采用的方法如下: Jenkins Poll SCM:设置Jenkins定时检查变更,在SVN版 ...
- go语言之进阶篇创建goroutine协程
1.goroutine是什么 goroutine是Go并行设计的核心.goroutine说到底其实就是协程,但是它比线程更小,十几个goroutine可能体现在底层就是五六个线程,Go语言内部帮你实现 ...
- 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[1] (转)
Index Data Author: David Smiley Eric Pugh 译者:Koala++ / 屈伟 在这一章中我们将了解如何将数据传入Solr.这个传入的过程称之为索引,尽管中间还包含 ...
- 全文检索(SOLR)前端应用浅析 (转)
最近在一个关于知识管理系统中检索的一个功能方案,找到了一个很好的参考应用方案嘎要的分析一下,希望有类似应用的可以交流交流. 提起全文检索,Lucene的大名估计地球人都知道,通过这么多年的发展,外围的 ...