I am using CentOS 7 os.
I installed python3.6 on this machine.
pip3 is latest version 21.
After that i installed obfsproxy like this :
To use obfsproxy you will need Python (>= 2.7) and pip.
pip3 install pathlib
pip3 install pyopenssl
pip3 install Twisted
pip3 install obfsproxy
Here are installation path :
/usr/local/lib/python3.6/site-packages/obfsproxy-0.2.13-py3.6.egg-info
/usr/local/lib/python3.6/site-packages/obfsproxy
/usr/local/lib/python3.6/site-packages/obfsproxy/pyobfsproxy.py
/usr/local/bin/obfsproxy
Now after running obfsproxy command i got this error :
Traceback (most recent call last):
File "/usr/local/bin/obfsproxy", line 11, in <module>
load_entry_point('obfsproxy==0.2.13', 'console_scripts', 'obfsproxy')()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
return ep.load()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
return self.resolve()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/site-packages/obfsproxy/pyobfsproxy.py", line 183
except ValueError, err:
^
SyntaxError: invalid syntax
[root#blobloblo ~]# obfsproxysite-packages/pkg_resources/__init__.py", line 476, in load_entry_point
What version of python is suitable for this script and how can i fix this error?
I tried some older python versions.
Buy manual installation has some error and this is better to install python3 from default repository.
Mean for install python3 i did this :
centos is updated totally.
sudo yum install -y epel-release
sudo yum install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
sudo yum -y groupinstall "Development Tools"
gcc --version
openssl version
openssl version -d
sudo yum install -y openssl-devel libyaml-devel libffi-devel bzip2-devel
sudo yum install -y make automake gcc glibc
sudo yum install -y gcc
python -V
python --version
python2 -V
python3 -V
sudo yum install python3
python3 -m pip install --upgrade pip
Here is https://pypi.org/project/obfsproxy/ link.
Related
I am trying to create a multi-arch image using python:3.9-slim-buster as the base image. However, when I run the buildx command, it runs into an error during the arm64 build phase:
> [linux/arm64 9/17] RUN apt-get install -y -f r-base:
#34 6.950 distribution that some required packages have not yet been created
#34 6.950 or been moved out of Incoming.
#34 6.950 The following information may help to resolve the situation:
#34 6.950
#34 6.950 The following packages have unmet dependencies:
#34 7.315 r-base : Depends: r-base-core (>= 4.2.2-1~bustercran.0) but it is not going to be installed
#34 7.315 Depends: r-recommended (= 4.2.2-1~bustercran.0) but it is not going to be installed
#34 7.315 Recommends: r-base-html but it is not going to be installed
#34 7.315 Recommends: r-doc-html but it is not going to be installed
#34 7.378 E: Unable to correct problems, you have held broken packages.
------
Dockerfile:18
--------------------
16 | # Install ASREML-R
17 | RUN apt install -y -t buster-cran40
18 | >>> RUN apt-get install -y -f r-base
19 |
20 | # install R packages
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install -y -f r-base" did not complete successfully: exit code: 100
I am also including the Dockerfile and the buildx command that I used:
# Dockerfile
FROM python:3.9-slim-buster
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONUNBUFFERED=1
ENV LOG_LEVEL info
#
RUN apt-get update
RUN apt-get install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7'
RUN add-apt-repository 'deb http://cloud.r-project.org/bin/linux/debian buster-cran40/'
## Install supervisor
RUN apt-get update
RUN apt-get install -y supervisor
#ENV PATH="/app/scripts:${PATH}"
# Install ASREML-R
RUN apt install -y -t buster-cran40
RUN apt-get install -y -f r-base
# install R packages
RUN Rscript -e "install.packages('sommer')"
RUN Rscript -e "install.packages('RJSONIO')"
RUN Rscript -e "install.packages('gtools')"
ENV PYTHONPATH "${PYTHONPATH}:/app/"
WORKDIR /app/
COPY . /app/
RUN Rscript /app/packages/install_asreml.R
# RUN apt-get update && pip3 install -r requirements.txt
RUN pip3 install --upgrade setuptools
RUN pip3 install -r requirements.txt
ENTRYPOINT [ "./start-worker.sh" ]
Build command:
docker buildx build \
-t test/test-image:test \
--cache-from=type=registry,ref=test/test-image-build-cache \
--cache-to=type=registry,ref=test/test-image-build-cache,mode=max \
--push --platform linux/arm64/v8,linux/amd64 \
--progress=plain \
.
I already tried using a different (the latest) slim-buster image that is available and tried adding the marutter PPA repository to no avail.
I need to install this specific python version, to prepare a developer environment, because I'm maintaining a system with multiple libraries based on python 3.6.9.
I recently installed Ubuntu 22.04 on my laptop, but I had no success trying to install this python version.
I tried to install with apt-get after adding the deadsneak repository, but this python version is not available.
I tried installing from source by compiling, but it did not work. Running sudo make altinstall exited with this error:
Segmentation fault (core dumped)
make: *** [Makefile:1112: altinstall] Erro 139
I have faced the same problems and could make it work by adding some additional flags when running ./configure
Here are my steps:
Step 1 – Prerequsities
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 tk-dev libffi-dev liblzma-dev \
libgdbm-dev libnss3-dev libedit-dev libc6-dev
Step 2 – Download Python 3.6
wget https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz
tar -xzf Python-3.6.15.tgz
Step 3 – Compile Python Source
cd Python-3.6.15
./configure --enable-optimizations -with-lto --with-pydebug
make -j 8 # adjust for number of your CPU cores
sudo make altinstall
Step 4 – Check the Python Version
python3.6 -V
If you need it to install with pyenv, you could try this one:
$ sudo apt install clang -y
$ CC=clang pyenv install 3.6.9
The problem
Hello everyone, I need to install R software (at least 3.5 but hopefully 3.6) in my raspberry pi 3 B
I started by doing the usual:
sudo apt-get update
sudo apt install r-base r-base-dev
Which works, but I get R 3.3
So then I tried what I found in this webpage and it works unil:
sudo add-apt-repository 'deb http://cran.dcc.uchile.cl/bin/linux/debian stretch-cran35/'
But I get the following error:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch
I am not sure what I am doing wrong
Please help!!
Finally after many tries I compiled it like this:
sudo apt-get install -y gfortran libreadline6-dev libx11-dev libxt-dev \
libpng-dev libjpeg-dev libcairo2-dev xvfb \
libbz2-dev libzstd-dev liblzma-dev \
libcurl4-openssl-dev \
texinfo texlive texlive-fonts-extra \
screen wget openjdk-8-jdk
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-3/R-3.6.1.tar.gz
sudo su
tar zxvf R-3.6.1.tar.gz
cd R-3.6.1
./configure --enable-R-shlib #--with-blas --with-lapack #optional
make
make install
cd ..
rm -rf R-3.6.1*
exit
cd
If anyone has a faster better version all the better
I am installing R. I am getting this error when runing ./configure :
checking for history_truncate_file... no
configure: error: --with-readline=yes (default) and headers/libs are not available
Any hint,
Thanks
Use the following command will solve this problem
./configure --with-readline=no --with-x=no
--with-x=no turns off the X Windows System . It is the GUI for the Linux and Unix-like OS. My computer has no X Windows installed, so I turn off.
But I highly recommand to install readline library before R installtion with '--with-readline=yes', as the command operation style is quitely unfriendly with '--with-readline=no' . See more libreadline installation in linux for more details
you can use the following command for more install configuration details
./configure --help
on I found problem on compiling R 3.1.1 so as a part of solution , i recommend to install the below libraries first before you compile this R and use
sudo apt-get install build-essential
sudo apt-get install fort77
sudo apt-get install xorg-dev
sudo apt-get install liblzma-dev libblas-dev gfortran
sudo apt-get install gcc-multilib
sudo apt-get install gobjc++
sudo apt-get install aptitude
sudo aptitude install libreadline-dev
Thank you other people who posted and kept the knowledge going..
I think you need the GNU readline package. You can install it with apt-get, aptitude, or the appropiate tool for your distribution. In Ubuntu:
aptitude install libreadline-dev
On Linux version 2.6.18-371.3.1.el5 (centos) the following worked for me
yum install readline-devel
and use --with-x=no in configure option as mentioned by others
I added this in the file taken here:
http://www.personal.psu.edu/mar36/blogs/the_ubuntu_r_blog/2012/08/installing-the-development-version-of-r-on-ubuntu-alongside-the-current-version-of-r.html
CXXFLAGS="-ggdb -pipe -Wall -pedantic -I/usr/include/readline5" \
CPPFLAGS="-I/usr/include/readline5" \
LDFLAGS="-L/usr/lib64/readline5" \
On Centos 7, building R-3.5.0, If you want to install in /data/R-3.0.5.
wget https://www.stats.bris.ac.uk/R/src/base/R-3/R-3.5.0.tar.gz
tar -zxvf R-3.5.0.tar.gz
cd R-3.5.0.tar.gz
mkdir -p /data/R-3.0.5
yum group install "Development tools" -y
yum install readline-devel -y
yum install xorg-x11-server-devel libX11-devel libXt-devel -y
yum yum install libbz2-devel -y
yum install lzma -y
yum install xz xz-devel -y
yum install pcre pcre-devel -y
yum install libcurl-devel -y
yum install texinfo -y
yum install texinfo-tex -y
yum install texlive -y
yum install texlive-fonts-extra -y
yum install levien-inconsolata-fonts -y
yum install java-1.8.0-openjdk -y
./configure --prefix=/data/R-3.0.5 '--with-cairo' \
'--with-jpeglib' '--with-readline' '--with-tcltk' \
'--with-blas' '--with-lapack' '--enable-R-profiling' \
'--enable-R-shlib' \
'--enable-memory-profiling'
make
make install
The error means your system cannot find the required package. On Ubuntu, you can refer to this document to install all missing dependencies. It works for R 4.0
https://github.com/Jiefei-Wang/Painless-R-compilation-and-installation-on-Ubuntu
I am trying to install RStudio on Centos 6.4 with an already installed R version.
I got the following error:
error: Failed dependencies:
libcrypto.so.6()(64bit) is needed by rstudio-server-0.97.336-x86_64
libgfortran.so.1()(64bit) is needed by rstudio-server-0.97.336-x86_64
libssl.so.6()(64bit) is needed by rstudio-server-0.97.336-x86_64
Any hint will be highly appreciated.
I fixed this error following this link:
http://jermdemo.blogspot.com.es/2011/08/installing-rstudio-server-on-scientific.html
You have to install some dependencies:
yum install libcrypto.so.6 -y
yum install libgfortran.so.1 -y
yum install libssl.so.6 -y
yum install openssl098e-0.9.8e -y
yum install gcc41-libgfortran-4.1.2 -y
yum install pango-1.28.1 -y
and the tricky one:
wget ftp.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/compat-
libgfortran-41-4.1.2-39.el6.x86_64.rpm
rpm -Uvh compat-libgfortran-41-4.1.2-39.el6.x86_64.rpm
and install Rstudio with no-deps flag:
rpm -Uvh --nodeps rstudio-server-0.97.336-x86_64.rpm
rstudio-server verify-installation