cli icon indicating copy to clipboard operation
cli copied to clipboard

Issue - Installing CF CLI on Ubuntu as windows subsystem For Linux

Open ghost opened this issue 4 years ago • 2 comments

Hi All,

I am using a windows 10 operating system. I have recently installed ubuntu 20.04.1 Linux Distribution as s Windows system for Linux. After this I am trying to install cf cli to push apps into SAP Cloud platform. I am facing the below list of issues.

To install the cf CLI on Debian and Ubuntu-based Linux distributions:

  1. Add the Cloud Foundry Foundation public key and package repository to your system by running: wget --no-check-certificate -v -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list

Results from console:

trinity@L-156205032:~$ wget --no-check-certificate -v -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list --2020-12-16 17:21:32-- https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key Resolving packages.cloudfoundry.org (packages.cloudfoundry.org)... [sudo] password for trinity: [sudo] password for trinity: 52.71.53.132, 54.83.38.204 Connecting to packages.cloudfoundry.org (packages.cloudfoundry.org)|52.71.53.132|:443... connected. WARNING: cannot verify packages.cloudfoundry.org's certificate, issued by ‘CN=proxy.wipro.com (t)\ ,OU=CIO,O=Wipro Ltd,ST=Karnataka,L=Bangalore,C=IN’: Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 3963 (3.9K) [text/plain] Saving to: ‘STDOUT’

  •                                     100%[=====================================================================================>]   3.87K  --.-KB/s    in 0s
    

2020-12-16 17:21:35 (78.6 MB/s) - written to stdout [3963/3963]

  1. Update your local package index by running:

sudo apt-get update

Results from console:

trinity@L-156205032:~$ sudo apt-get update Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Fetched 324 kB in 23s (14.0 kB/s) Reading package lists... Done

  1. To install cf CLI v7, run:

sudo apt-get install cf7-cli

Results from console:

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cf7-cli

Need help here.

ghost avatar Dec 17 '20 06:12 ghost

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/176201739

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Dec 17 '20 06:12 cf-gitbot

There are two commands that you need to use to 1.) make ubutntu trust the key for the repo and 2.) save the repo details into a file so that ubuntu knows to check in there for packages.

The output from the commands in your case makes it appear that it has only run the first of the commands and ignored the second one.

The wget and the echo should be pasted into your terminal as separate lines.. not a single one.

1.) wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - 2.) echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list

After you've done that, you should find that an 'apt-get update' will list the CF package source in addition to the ubuntu ones.

jimconner avatar Aug 06 '21 08:08 jimconner