Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdtest gets installed instead of yarn #7

Open
zeroedin opened this issue Jun 10, 2019 · 2 comments
Open

cmdtest gets installed instead of yarn #7

zeroedin opened this issue Jun 10, 2019 · 2 comments

Comments

@zeroedin
Copy link

zeroedin commented Jun 10, 2019

This is not directly related to this cookbook rather to Ubuntu and the yarn package specifically but figure I would mention it here.

Referencing Issues found yarnpkg/yarn#3189 and https://github.com/Joystream/helpdesk/issues/16

cmdtest is installed instead of yarn on AWS Ubuntu 18.04

2019-06-10T10:16:36-04:00] INFO: Processing yarn_install[/srv/www/xxxxx/releases/20190610141627] action run (/srv/www/lists/releases/20190610141627/deploy/before_restart.rb line 42)
[2019-06-10T10:16:36-04:00] INFO: Processing execute[execute yarn install at `/srv/www/xxxxx/releases/20190610141627`] action run (/var/chef/runs/ecec4f1c-a306-4104-a303-d51caab053cc/local-mode-cache/cache/cookbooks/yarn/resources/install.rb line 18)
 
================================================================================
Error executing action `run` on resource 'execute[execute yarn install at `/srv/www/xxxxx/releases/20190610141627`]'
================================================================================
 
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of yarn install ----
STDOUT: Parsing scenario file install
STDERR: ERROR: [Errno 2] No such file or directory: 'install'
---- End output of yarn install ----
Ran yarn install returned 1

Following up the recipe with an attempt to install yarn via sudo apt-get install yarn yields:

sudo apt-get install yarn
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'cmdtest' instead of 'yarn'
The following additional packages will be installed:
  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-chardet python-cliapp python-markdown python-minimal python-pkg-resources python-pygments
  python-ttystatus python-yaml python2.7 python2.7-minimal
Suggested packages:
  python-doc python-tk python-xdg python-markdown-doc python-setuptools ttf-bitstream-vera python2.7-doc binfmt-support
The following NEW packages will be installed:
  cmdtest libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-chardet python-cliapp python-markdown python-minimal python-pkg-resources python-pygments
  python-ttystatus python-yaml python2.7 python2.7-minimal
0 upgraded, 15 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/4996 kB of archives.
After this operation, 22.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Manually installing yarn without the recipe via the following commands seemed to work to resolve:

sudo apt remove cmdtest 
sudo apt remove yarn && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - 
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 
sudo apt-get update && sudo apt-get install yarn

Adding the following to the key instead of the default .gpg url for node['yarn']['package']['repository']['key'] seemed to be the fix for me

"yarn": {
  "package": {
    "repository": {
      "key": "23E7166788B63E1E"
    }
  }
}
@ritu9898
Copy link

ritu9898 commented Sep 28, 2020

sudo apt remove cmdtest
sudo apt remove yarn && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

This didn't work for me until I added this one line.

sudo apt install gcc g++ make

@mesozoic-technology
Copy link

ubuntu@ip-172-31-24-108:~$ sudo apt remove yarn && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'cmdtest' instead of 'yarn'
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
gpg: [don't know]: partial length invalid for packet type 63
gpg: read_block: read error: Invalid packet
gpg: import from '-' failed: Invalid keyring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants