Installation error when installing Ruby for Jekyll - ruby

I'm running on Windows 10 Enterprise, build 1703. I have Anaconda 4.4.0 and Python 3.6 installed. I'm running bash and Ubuntu Linux was installed o.k.
I'm trying to install Ruby for Jekyll (https://jekyllrb.com/docs/windows/#installing-jekyll).
The install command is:
sudo apt-get install ruby2.3 ruby2.3-dev build-essential
and it gives the error:
root#bigsur:/mnt/c/Windows/System32# sudo apt-get install ruby2.3 ruby2.3-dev build-essential
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
root#bigsur:/mnt/c/Windows/System32#
root#bigsur:/mnt/c/Windows/System32#
root#bigsur:/mnt/c/Windows/System32# sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python3.5:
python3.5 depends on python3.5-minimal (= 3.5.2-2ubuntu0~16.04.3); however:
Version of python3.5-minimal on system is 3.5.2-2ubuntu0~16.04.1.
python3.5 depends on libpython3.5-stdlib (= 3.5.2-2ubuntu0~16.04.3); however:
Package libpython3.5-stdlib:amd64 is not installed.
dpkg: error processing package python3.5 (--configure):
dependency problems - leaving unconfigured
Setting up libapt-inst2.0:amd64 (1.2.24) ...
dpkg: unrecoverable fatal error, aborting:
unable to truncate for updated status of 'libapt-inst2.0:amd64': Invalid argument
root#bigsur:/mnt/c/Windows/System32#
Any help will be greatly appreciated.
Charles

I read many posts on the Internet that said the best way to install Jekyll was to install by way of a linux subsystem. I now realize that this is bad advice. After running into trouble (see above), I started over. I found that Build 1703 of Windows 10 Enterprise already had the infrastructure to install Jekyll with the instructions at: https://jekyllrb.com/docs/installation/. I followed these instructions and I now have a clean installation of Jekyll. Don't bother installing Ubuntu. You don't need it, and you will save over 700 MBytes of disc space.
Charles

Related

How can I install libdouble-conversion-dev on Ubuntu 18.04?

I tried installing the libdouble-conversion-dev package using sudo apt-get install libdouble-conversion-dev but failed with the following output:
Package libdouble-conversion-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libdouble-conversion-dev' has no installation candidate
I have also tried running sudo apt-get update beforehand and got the same results, as well as installing from the debian file from https://packages.debian.org/buster/amd64/libdouble-conversion-dev/download but nothing seemed to have changed.
You can manually install a Debian package on a compatible Ubuntu host with sudo dpkg -i $name_of_package_file.

Ubuntu 18.04 "sudo apt-get install python2" results in "E: Unable to locate package python2"

In preparation for supporting a Python 2 legacy application I just installed Ubuntu 18.04.5, which includes Python 3 but not Python 2. Pretty much every Python 2 install tutorial website shows the following command for installing Python 2:
sudo apt-get install python2
Upon which I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python2
Some sites list these commands first so I tried these as well:
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install python2
This gives the same results as above.
I setup Ubuntu 20.04 on a different computer and installed Python 2 about a month ago and I could swear I used the same commands and at that time it worked. I also remember something about Python 2 being decommissioned at the end of January 2021 (which just passed).
Was the Python 2 pip package taken down? Is there some way I can verify this? If so, is there some special curl command that can still download Python 2 or a website I can download it from?
After searching the Ubuntu packages, it seems that for some odd reason for Ubuntu 20.04 the name of the Python 2 package is python2 but for Ubuntu 18.04 there is no package named python2. It seems that for Ubuntu 18.04 by running:
sudo apt-get install python-pip
This installs both pip for Python 2 and Python 2 itself, so this seems to be the best option

Installing python-ldap fails with lber.h file not found in ubuntu 17.10 even after installing devel packages

I am trying to install python-ldap package using pip. I am getting the below error while executing pip install python-ldap. I tried installing the package corresponding to ubuntu 17.10 ( Artful ) as per this question but no luck yet. What package am I missing ?
Solution in the above stack overflow question is to install
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
But in 17.10 I could not see libsasl2-dev & libldap2-dev instead I could see packages libsasl-2-2& libldap-2.4-2. I installed those along with phthon-dev & libssl-dev. But still I am getting the below error.
Seems I am missing some package installation which has lber.h file in it.
Error I am getting :
In file included from Modules/LDAPObject.c:8:0:
Modules/constants.h:7:10: fatal error: lber.h: No such file or directory
#include "lber.h"
^~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Python version - 3.6.3
Pip version - 19.1.1
I have figured out the root cause myself. Issue seems to be the dev packages itself.
Need to install libsasl2-dev, libldap2-dev & libssl-dev. I was not able to see these packages in 17.10 as the main repository mirror urls are changed as the version is archived as per the below question.
https://askubuntu.com/questions/1141501/i-cant-run-sudo-apt-get-update-in-ubuntu-17-10
I have changed to 18.04 and after installing the above packages everything works great.
This worked for me:
apt-get update -y && apt-get install -y python3-dev libldap2-dev libsasl2-dev ldap-utils tox lcov valgrind

xeus-cling install fails in Anaconda

I have created a new virtual instance of Ubuntu 18.10
On this fresh installation, I then installed Anaconda as per the installation instructions (using curl, which I also installed).
The next thing I did (quite literally) after verifying conda was correctly installed was to install xeus-cling via
conda install xeus-cling -c QuantStack -c conda-forge
After downloading all the packages, the install fails with this error:
Executing transaction: failed ERROR conda.core.link:_execute(502): An
error occurred while installing package 'QuantStack::gcc-7-7.2.0-2'.
LinkError: post-link script failed for package
QuantStack::gcc-7-7.2.0-2 running your command again with -v will
provide additional information location of failed script:
/home/anaconda/anaconda3/bin/.gcc-7-post-link.sh
==> script messages <==
Attempting to roll back.
Rolling back transaction: done
LinkError: post-link script failed for package
QuantStack::gcc-7-7.2.0-2 running your command again with -v will
provide additional information location of failed script:
/home/anaconda/anaconda3/bin/.gcc-7-post-link.sh
==> script messages <==
I have repeated this several times, and the error is always the same. Any idea how to resolve the problem? It looks like an issue with the version of gcc, but I'm not sure how to resolve/fix it.
Other conda packages (i.e. SciJava) install without problems (tested in other instances of this process).
Ran into the same issue and resolved it by running
sudo apt-get update
sudo apt-get install -y build-essential
I ran into it on the anaconda3 docker image - so your mileage may vary.

update-alternatives: error: alternative path /usr/bin/gem1.8 doesn't exist

I am trying to install ruby1.8 on Ubuntu 14.04 so that I can be able to run a work application. When i run this command:
sudo apt-get install build-essential ruby1.8-dev ruby-dev mysql-client mysql-server git-core libmysql-ruby libmysqlclient-dev unzip rubygems
I get these errors below:
Building dependency tree Reading state information...
Done build-essential is already the newest version. git-core
is already the newest version. ruby-dev is already the newest
version. unzip is already the newest version.
libmysqlclient-dev is already the newest version. mysql-client is
already the newest version. mysql-server is already the newest
version. ruby1.8-dev is already the newest version. rubygems
is already the newest version. libmysql-ruby1.8 is already the
newest version. 0 upgraded, 0 newly installed, 0 to remove and 161
not upgraded. 1 not fully installed or removed. After this
operation, 0 B of additional disk space will be used. Do you want
to continue? [Y/n] y Setting up rubygems (1.8.25-1bbox3~trusty1)
... update-alternatives: error: alternative path /usr/bin/gem1.8
doesn't exist dpkg: error processing package rubygems
(--configure): subprocess installed post-installation script
returned error exit status 2 Errors were encountered while
processing: rubygems E: Sub-process /usr/bin/dpkg returned an
error code (1) lusekero_mwathengere#lusekero:~$
Please help....I know ruby1.8 is an old version but this is what we are using at work so I need to succeed in this installation.
Thanks, in advance, for any help rendered.
I ran into a similar error message while putting ruby on rails on AWS:
Setting up rubygems (1.8.25-1bbox3~trusty1) ...
update-alternatives: error: alternative path /usr/bin/gem1.8 doesn't exist
dpkg: error processing package rubygems (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
rubygems
E: Sub-process /usr/bin/dpkg returned an error code (1)
The solution was to manually install the library for the missing alternative path. in ubuntu:
sudo apt-get install rubygems1.8
This allowed my install script to find the requested files.
This worked for me:
sudo apt-get install rubygems1.8
update-alternatives --set ruby /usr/bin/ruby1.8

Resources