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

Instalation issue on ubuntu #7265

Closed
amitguptagwl opened this issue Jan 4, 2019 · 9 comments
Closed

Instalation issue on ubuntu #7265

amitguptagwl opened this issue Jan 4, 2019 · 9 comments

Comments

@amitguptagwl
Copy link

I'm getting the error on first step ie Setup repository

Err:8 https://dist.crystal-lang.org/apt crystal InRelease                                                         
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 09617FD37CC06B54
@wooster0
Copy link
Contributor

wooster0 commented Jan 4, 2019

Do you use 18.04? When I try to install Crystal with 18.04, I get this error too and I also had other issues installing packages. You should try 16.04. For me the most stuff works in 16.04.

@amitguptagwl
Copy link
Author

No! I'm using 17.10. I tried to follow manual steps but facing issue in that

Unpacking crystal (0.27.0-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-tR5b15/6-crystal_0.27.0-1_amd64.deb (--unpack):
 unable to open '/usr/share/doc/crystal/api/index.json.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /tmp/apt-dpkg-install-tR5b15/6-crystal_0.27.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

@straight-shoota
Copy link
Member

@amitguptagwl So the first error came from running the setup script https://dist.crystal-lang.org/apt/setup.sh? Unfortunately that one's different from the manual steps in that it refers to a key hosted on keys.gnupg.net which has already caused some issues. Not sure if that's related.

The second error looks like a hiccup in the apt installer. It seems that the key validation has succeeded at least.
Try apt purge crystal && apt install crystal to reinstall the package.

@amitguptagwl
Copy link
Author

Sorry it didn't work

$ sudo apt install crystal
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libxml2-dev libgmp-dev libyaml-dev libreadline-dev
The following NEW packages will be installed:
  crystal
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/38.0 MB of archives.
After this operation, 176 MB of additional disk space will be used.
(Reading database ... 348764 files and directories currently installed.)
Preparing to unpack .../crystal_0.27.0-1_amd64.deb ...
Unpacking crystal (0.27.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb (--unpack):
 unable to open '/usr/share/doc/crystal/api/search-index.js.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


$ ll -h /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb
-rw-r--r-- 1 root root 37M Nov  2 20:50 /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb

$ sudo gdebi /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done

no description given
Do you want to install the software package? [y/N]:y
(Reading database ... 348764 files and directories currently installed.)
Preparing to unpack .../crystal_0.27.0-1_amd64.deb ...
Unpacking crystal (0.27.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb (--install):
 unable to open '/usr/share/doc/crystal/api/index.json.dpkg-new': Operation not permitted
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/crystal_0.27.0-1_amd64.deb

I've also tried chmod +655

@straight-shoota
Copy link
Member

Any insight on what might be causing this error in /usr/share/doc/crystal/api? I'd like to think this is some apt/dpkg issue and not necessarily caused by the Crystal package. Might be wrong though.

FYI you can also install the binary directly without apt: https://crystal-lang.org/docs/installation/from_a_targz.html

@RX14
Copy link
Member

RX14 commented Jan 4, 2019

https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1739991

It's your antivirus. Don't use antivirus solutions, especially on linux.

@RX14 RX14 closed this as completed Jan 4, 2019
@rishavs
Copy link

rishavs commented Jun 16, 2020

i just setup a new wsl instance and am unable to install crystal on it;

rishav@rishav-sbook:/mnt/c/Users/risharan$ curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6896  100  6896    0     0   4932      0  0:00:01  0:00:01 --:--:--  4936
gpg: can't connect to the agent: IPC connect call failed
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:5 https://dist.crystal-lang.org/apt crystal InRelease [2496 B]
Err:5 https://dist.crystal-lang.org/apt crystal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 09617FD37CC06B54
Reading package lists... Done
W: GPG error: https://dist.crystal-lang.org/apt crystal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 09617FD37CC06B54
E: The repository 'https://dist.crystal-lang.org/apt crystal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
rishav@rishav-sbook:/mnt/c/Users/risharan$ sudo apt install crystal
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package crystal
rishav@rishav-sbook:/mnt/c/Users/risharan$

Manually adding the key also doesnt works;

rishav@rishav-sbook:/mnt/c/Users/risharan$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
gpg: can't connect to the agent: IPC connect call failed

@straight-shoota
Copy link
Member

straight-shoota commented Jun 16, 2020

This seems to be a gpg issue. Which gpg package are you using? Maybe this can help: https://stackoverflow.com/questions/46673717/gpg-cant-connect-to-the-agent-ipc-connect-call-failed

@rishavs
Copy link

rishavs commented Jun 16, 2020

After some investigation, I think this is the issue; microsoft/WSL#5125
I installed ubuntu 20.04 on wsl1 which is not supported.
I will try to get on wsl2 tomorrow and see if everything works fine there

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

5 participants