Sunday 29 April 2018

The following packages have unmet dependencies: nodejs : Conflicts: nodejs-legacy

while setting up an iquidus explorer i just hacked my way to nodejs-legacy installing freedom through sheer elan ... maybe


after being given access to someone elses pre-loved server,
was getting error whilst trying to install nodejs-legacy
The following packages have unmet dependencies:
 nodejs : Conflicts: nodejs-legacy

not entirely which bit was the real magic but after an extended duration of getting constant rejections this is hopefully the bare basics,
possibly it's more than everything necessary.
remove nodejs, install nodejs from nodesource, change package manager priority to ubuntu servers, upgrade nodejs, install nodejs-legacy


remove current nodejs
# apt-get remove nodejs

update etc
# apt install -f
# apt update
# apt dist-upgrade

install nodejs v10 from the horses mouth (ie nodesource itself)
# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# apt-get install nodejs -y

..
etc
..

# nodejs -v
v10.0.0

adjust priority to ubuntu servers and upgrade to v10.25
# apt-cache policy nodejs
nodejs:
  Installed: 10.0.0-1nodesource1
  Candidate: 10.0.0-1nodesource1
  Version table:
 *** 10.0.0-1nodesource1 0
        500 https://deb.nodesource.com/node_10.x/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.10.25~dfsg2-2ubuntu1 0

        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
nano /etc/apt/preferences.d/nodejs

.. in my case i gave archive.ubuntu.com a higher value by adding the following
Package: *
Pin: origin archive.ubuntu.com
Pin-Priority: 1002
..

# apt-cache policy nodejs
nodejs:
  Installed: 10.0.0-1nodesource1
  Candidate: 0.10.25~dfsg2-2ubuntu1
  Version table:
 *** 10.0.0-1nodesource1 0
        500 https://deb.nodesource.com/node_10.x/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.10.25~dfsg2-2ubuntu1 0
       1002 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

re-install and success !!
# apt-get install --reinstall nodejs 

.. updates nodejs ..

# apt-get install nodejs-legacy





discussion on raising the package priority
https://github.com/nodejs/help/issues/1040#issuecomment-362970187

Tuesday 10 April 2018

updating TLS protocol for git on Mountain Lion using Macports


apparently github has deprecated older TLS protocols,
when attempting to use git geting error

fatal: unable to access 'https://github.com/git/git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

seemingly the answer is to upgrade curl (which also updates openssl), and git

BEFORE
$ curl --version
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz 

$ sudo port install curl
...now is downloading and installing etc etc etc ...


AFTER
open new window
$ curl --version
curl 7.59.0 (x86_64-apple-darwin12.6.0) libcurl/7.59.0 OpenSSL/1.0.2o zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.1 (+libidn2/2.0.4)
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy PSL

also necessary seems to be updating git, the latest available for Mountain Lion is too old

BEFORE
$ git --version
git version 2.3.5

so it becomes necessary for downloading https://github.com/git/git, going into such directory and making



AFTER
$ /Volumes/whereever/new/version/is/git --version
git version 2.17.GIT

using this newly made version is now succesful for such as cloning

$ /Volumes/whereever/new/version/is/git clone https://github.com/git/git



installing via command line is not effective ($ make install), the version of git is not updated in this case.
so i will have to sort that out later ..