OS Ubuntu 20.04.3
Python intalation 3.10.2
error: make: *** [Makefile:1280: install] Erro 1 after sudo make install
make: latest version
what should I do?
This is the full set of steps which worked for me. to install
# python3 --version
Python 3.10.4
In Ubuntu 21.10:
$ sudo apt install build-essential
$ sudo apt install libssl-dev libffi-dev libncurses5-dev zlib1g zlib1g-dev libreadline-dev libbz2-dev libsqlite3-dev make gcc
$ cd /to/extracted/folder
$ ./configure
$ make
$ sudo make install
Common errors if you do not follow this process:
Critical dependencies were missing:
[Makefile:1280: install] Erro 1
Ran 'make' before all dependencies were met but it didn't fail to compile (have to install all packages then make clean then make):
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting <package>
Could not fetch URL https://pypi.python.org/simple/<package>/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement <package> (from versions: )
No matching distribution found for <package>
You have to install dependencies (libraries) to be able build python from source code:
sudo apt install libssl-dev libffi-dev libncurses5-dev zlib1g zlib1g-dev libreadline-dev libbz2-dev libsqlite3-dev make gcc
Related
Building Mesos 1.3.0 from sources on linux-mint release 18.2 I get the following message:
configure: error: cannot find libz
When I try to search packages starts with libz* I get many packages names starting with libz. Which one is the right package I should install it?
Try installing zlib1g-dev. It's listed in the documentation
Linux Mint 18.2 is based on Ubuntu 16.04.
So, you should follow instructions for Ubuntu
16.04.
# Update the packages.
$ sudo apt-get update
# Install a few utility tools.
$ sudo apt-get install -y tar wget git
# Install the latest OpenJDK.
$ sudo apt-get install -y openjdk-8-jdk
# Install autotools (Only necessary if building from git repository).
$ sudo apt-get install -y autoconf libtool
# Install other Mesos dependencies.
$ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev
(py36venv) vagrant#pvagrant-dev-vm:/vagrant/venvs$ pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pep8 Could not fetch URL
https://pypi.python.org/simple/pep8/: There was a problem confirming
the ssl certificate: Can't connect to HTTPS URL because the SSL module
is not available. - skipping
Could not find a version that satisfies the requirement pep8 (from
versions: ) No matching distribution found for pep8
Background information - Trying to move to python 3.6.
Installed python3.6 using the below commands:
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8 sudo
make altinstall python3.6
Created virtualenv by:
python3.6 -m venv py36venv
source py36venv/bin/activate
Tried to install pep8
(py36venv) pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl
module in Python is not available.
Collecting pep8
Could not fetch URL https://pypi.python.org/simple/pep8/: There was a problem
confirming the ssl certificate: Can't connect to HTTPS URL because the
SSL module is not available. - skipping Could not find a version
that satisfies the requirement pep8 (from versions: ) No matching
distribution found for pep8
I followed the below steps for python3.6 installation in ubuntu 14.04 and virtualenv pip installs works fine.
Python 3.6 Installation:
sudo apt-get install python3-dev libffi-dev libssl-dev
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8
sudo make altinstall
python3.6
If seeing the following error --
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1
try:
sudo apt-get install zlib1g-dev
Validation:
Create virtualenv in python3.6:
python3.6 -m venv testenv
source testenv/bin/activate
pip install pep8
using pip:
(testenv) vagrant#pvagrant-dev-vm:~$ pip install pep8
*Collecting pep8
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 4.1MB/s
Installing collected packages: pep8
Successfully installed pep8-1.7.0*
(testenv) vagrant#pvagrant-dev-vm:~$ pip list
pep8 (1.7.0)
pip (9.0.1)
setuptools (28.8.0)
I stumbled upon the same issue when I tried to create a virtual environment utilising python3.6.0. Here is my solution for Mac OS X 10.12.2 (Py_minion comment was pretty close):
Setup
I created the environment by the following steps:
downloading python3.6.0
running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
So basically similar to: https://stackoverflow.com/a/11301911/1286093
An indication if you have the same issue as I had would be a similar line when running make
The necessary bits to build these optional modules were not found: _ssl
Solution
Install openssl
brew install openssl
brew unlink openssl && brew link openssl --force
Change Module/Setup or Module/Setup.dist
You can find those files in the directory of the downloaded Python version.
Comment in and, if necessary change, lines 209 - 211 (I had to change the SSL variable to my openssl location).
SSL=/usr/local/opt/openssl <---- THIS DEPENDS ON YOUR INSTALLATION
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
Given that this was the location of openssl
Set environment variables
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
make and install again
Running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
again did the trick for me
Running make reported to me in the shell output:
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_sqlite3 _ssl _tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
What solved the problem in my case (Linux Mint 18.1, openssl already installed) was editing the setup.py in the Python-3.6.0 folder adding there the path to where the openssl installation put the ssl.h file on my system into ( /usr/include/openssl/ssl.h ). Here the section in which I have added the line '/usr/include':
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
'/usr/local/ssl/include/',
'/usr/contrib/ssl/include/',
'/usr/include/'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
)
I have solved this problem on Ubuntu-16.04.1.
First you need to install necessary libraries. To install open Terminal (Ctrl+Alt+T), then type;
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
After that go the directory where your python file is then reconfigure and reinstall python3.6 .
cd /opt/Python3.6/
./configure
make
sudo make install
NOTE
If you installed Python3.6 via ppa, then reinstall it again;
sudo apt-get install python3.6
Now you should be able to use pip3.6
I ran into the same error when building Python 3.6.1 from source under CentOS 7.
For CentOS7, I had to first:
sudo yum install openssl-dev
Then:
./configure --enable-optimizations
make altinstall
Now pip3.6 works :-)
A complete script can be found HERE
Install Prerequisites
For RHEL/CentOS
sudo yum -y install gcc gcc-c++ zlib zlib-devel libffi-devel openssl-devel wget
For Ubuntu/Debian
sudo apt-get -y install build-essential python-dev python-setuptools python-pip
python-smbus libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev
tk-dev libssl-dev openssl libffi-dev wget
Download Python
Modify for the version of python you want
Python Versions
cd /var/tmp
sudo wget https://www.python.org/ftp/python/3.x.x/Python-x.x.x.tgz
sudo tar xf Python-3.*.tgz
cd Python-3*
Configure/Make/Install
sudo ./configure --enable-optimizations --enable-shared --prefix=/usr/local
sudo make && make altinstall
Cleanup Shared Library & Add to Path
Stripping the shared library of debugging symbols can speed up execution when running parallel scripts.
sudo make && make altinstall
sudo strip /usr/local/lib/libpython3.7m.so.1.0
sudo echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib' >> /etc/profile.d/python.sh
sudo echo 'export PATH=${PATH}:~/usr/local/bin/' >> /etc/profile.d/python.sh
sudo echo '/usr/local/lib' >> /etc/ld.so.conf
sudo ldconfig
Reference
Gist
Stack Overflow
Stack Overflow
Daniel Erikson
Unix StackExchange
TLDP
http://www.darkoperator.com/installing-metasploit-in-ubunt/
Here is the site I used for the installation process
I typed
msfconsole
after install rbenv ruby (I know its a longer installation, but I still did), and got this error.
/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:370:in
parse: (/opt/metasploit-framework/config/database.yml): mapping
values are not allowed in this context at line 9 column 22
(Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:370:in
parse_stream
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:318:in
parse
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:245:in load
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in block
in load_file
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in open
from /usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/psych.rb:464:in
load_file
from /opt/metasploit-framework/lib/msf/ui/console/driver.rb:164:in
initialize
from /opt/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in
new
from /opt/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in
driver
from /opt/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in
start
from /opt/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in
start
from /usr/local/bin/msfconsole:48:in
Please help!!!
Complete credit to Iraklis Mathiopoulos #https://medium.com/#iraklis/sometimes-you-need-metasploit-running-on-a-box-with-a-public-ip-in-order-to-get-reverse-shells-to-74fda07165a5#.2tplo6bnh:
Installing the Pre-requisites.
adduser msfdev
adduser msfdev sudo
apt-get update
apt-get -y install autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev
Using msfdev for install
su - msfdev
wget https://raw.githubusercontent.com/iam1980/metasploit-vps-installer/master/msf_vps_installer.sh
bash msf_vps_installer.sh
I generally always use the free installer to install a standalone version of metasploit.
it is outlined here under installation.
You can simply git clone and then install
git clone https://github.com/rapid7/metasploit-framework.git
Here is the error log
Downloading ruby-2.2.0.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...
BUILD FAILED (Ubuntu 14.04 using ruby-build 20141225-7-g4aeeac2)
Inspect or clean up the working tree at /tmp/ruby-build.20150106233051.25615 Results logged to /tmp/ruby-build.20150106233051.25615.log
Last 10 log lines:
compiling ossl_x509store.c
compiling ossl_engine.c
compiling ossl_ocsp.c
compiling ossl_config.c
compiling ossl_digest.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory /tmp/ruby-build.20150106233051.25615/ruby-2.2.0/ext/openssl'
make[1]: Leaving directory/tmp/ruby-build.20150106233051.25615/ruby-2.2.0'
make: *** [build-ext] Error 2
I'm not sure what to do here. I tried this but when I type ruby -v it still tells me I have the old version.
sudo apt-get install autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
Thanks for any comments given, much appreciated.
install these dependencies first and then retry worked for me on 14.04 for ruby 2.2.0 with rbenv
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
All of other anwsers failed for me...
and after lot of failed attempts and research I found out those workarounds for many versions:
2.1.1
curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1
2.0.0-p451
curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 2.0.0-p451
2.0.0-p247
cat <(curl -fsSL https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/changeset_r45225.diff) <(curl -fsSL https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/changeset_r45240.diff) | sed -E 's/^((---|\+\+\+) )(a|b)\/([^ ]+\s+\(revision [0-9]+\))$/\1\4/' | sed '/rl_delete_text/d' | rbenv install -p 2.0.0-p247
Source: https://github.com/sstephenson/ruby-build/issues/526
Hope i could help anyone.
If you are using Ubuntu and or Debian than you can try to install libffi-dev via apt-get.
$ apt-get install libffi-dev
I did a little research around the forums and I found this on the official rbenv Question and Answer section.
https://github.com/sstephenson/ruby-build/wiki#build-failure-of-fiddle-with-ruby-220
I am running the latest RVM on Ubuntu 10.10 and I managed to get most of the development environment running, except for OpenSSL.
When I try to install the package I get the following error:
$ rvm package install openssl > error
ERROR: Error running 'tar zxf /home/ruby/.rvm/archives/openssl-0.9.8n.tar.gz -C
/home/ruby/.rvm/src', please read /home/ruby/.rvm/log/openssl/extract.log
ERROR: Error running './config -I/home/ruby/.rvm/usr/include -L/home/ruby/.rvm
/usr/lib
--prefix=/home/ruby/.rvm/usr zlib no-asm no-krb5 shared ', please read /home/ruby
/.rvm/log/openssl/configure.log
ERROR: Error running '/usr/bin/make ', please read /home/ruby/.rvm/log/openssl/make.log
ERROR: Error running '/usr/bin/make install', please read /home/ruby/.rvm/log/openssl
/make.install.log
It seems that the original downloaded file is corrupt when I get it via RVM. So, I downloaded and unpacked it to ~/.rvm/src/openssl0.9.8 and the first error is gone (error running tar zxf), but I still get the other ones.
Edit: my Ruby version, if anyone cares, is:
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
Did you run rvm requirements after installing RVM? It shows a list of all needed dependencies, and supplies the recommended "apt-get" command.
/usr/bin/apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
This will install openssl and libssl-dev, both of which are required. I've installed RVM and Ruby many times on Ubuntu and always used RVM's recommended way without a problem.
Do you have libssl installed in Ubuntu?
sudo apt-get install libssl0.9.8
Also install the development package:
sudo apt-get install libssl-dev