apk tool gives permission denied












0















I get this error message running alpine linux in a docker container hosted by Ubuntu 18.04 in Vagrant with its host in turn being Windows 10 behind a proxy. I have set the proxy variables but still get the same error.



/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied
WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: Permission denied
WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory
2 errors; 13 distinct packages available
/ #


What can I do?










share|improve this question





























    0















    I get this error message running alpine linux in a docker container hosted by Ubuntu 18.04 in Vagrant with its host in turn being Windows 10 behind a proxy. I have set the proxy variables but still get the same error.



    / # apk update
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied
    WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: Permission denied
    WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory
    2 errors; 13 distinct packages available
    / #


    What can I do?










    share|improve this question



























      0












      0








      0








      I get this error message running alpine linux in a docker container hosted by Ubuntu 18.04 in Vagrant with its host in turn being Windows 10 behind a proxy. I have set the proxy variables but still get the same error.



      / # apk update
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
      ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied
      WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
      ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: Permission denied
      WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory
      2 errors; 13 distinct packages available
      / #


      What can I do?










      share|improve this question
















      I get this error message running alpine linux in a docker container hosted by Ubuntu 18.04 in Vagrant with its host in turn being Windows 10 behind a proxy. I have set the proxy variables but still get the same error.



      / # apk update
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
      ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied
      WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
      ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: Permission denied
      WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory
      2 errors; 13 distinct packages available
      / #


      What can I do?







      virtual-machine docker alpine-linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 26 '18 at 6:21







      Niklas Rosencrantz

















      asked Oct 26 '18 at 6:11









      Niklas RosencrantzNiklas Rosencrantz

      1,06331437




      1,06331437






















          2 Answers
          2






          active

          oldest

          votes


















          0














          For some reason I had to run this command in the Ubuntu host:



          sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf



          Then it worked.






          share|improve this answer































            0














            I was getting the same symptoms until I followed the steps in Docker network config.



            i.e.
            - vi ~/.docker/config.json
            - Update and add:
            ,"proxies":
            {
            "default":
            {
            "httpProxy": "http://your-proxy-host:your-proxy-port",
            "noProxy": "*.test.example.com,.example2.com"
            }
            }

            Make sure you include the protocol in the httpProxy setting. i.e. "httpProxy": "http://**your-proxy-host..." and **not "httpProxy": "your-proxy-host..."
            Once I did this, the fetches were successful.





            share








            New contributor




            roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477894%2fapk-tool-gives-permission-denied%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              For some reason I had to run this command in the Ubuntu host:



              sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf



              Then it worked.






              share|improve this answer




























                0














                For some reason I had to run this command in the Ubuntu host:



                sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf



                Then it worked.






                share|improve this answer


























                  0












                  0








                  0







                  For some reason I had to run this command in the Ubuntu host:



                  sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf



                  Then it worked.






                  share|improve this answer













                  For some reason I had to run this command in the Ubuntu host:



                  sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf



                  Then it worked.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 26 '18 at 7:11









                  Niklas RosencrantzNiklas Rosencrantz

                  1,06331437




                  1,06331437

























                      0














                      I was getting the same symptoms until I followed the steps in Docker network config.



                      i.e.
                      - vi ~/.docker/config.json
                      - Update and add:
                      ,"proxies":
                      {
                      "default":
                      {
                      "httpProxy": "http://your-proxy-host:your-proxy-port",
                      "noProxy": "*.test.example.com,.example2.com"
                      }
                      }

                      Make sure you include the protocol in the httpProxy setting. i.e. "httpProxy": "http://**your-proxy-host..." and **not "httpProxy": "your-proxy-host..."
                      Once I did this, the fetches were successful.





                      share








                      New contributor




                      roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        I was getting the same symptoms until I followed the steps in Docker network config.



                        i.e.
                        - vi ~/.docker/config.json
                        - Update and add:
                        ,"proxies":
                        {
                        "default":
                        {
                        "httpProxy": "http://your-proxy-host:your-proxy-port",
                        "noProxy": "*.test.example.com,.example2.com"
                        }
                        }

                        Make sure you include the protocol in the httpProxy setting. i.e. "httpProxy": "http://**your-proxy-host..." and **not "httpProxy": "your-proxy-host..."
                        Once I did this, the fetches were successful.





                        share








                        New contributor




                        roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          I was getting the same symptoms until I followed the steps in Docker network config.



                          i.e.
                          - vi ~/.docker/config.json
                          - Update and add:
                          ,"proxies":
                          {
                          "default":
                          {
                          "httpProxy": "http://your-proxy-host:your-proxy-port",
                          "noProxy": "*.test.example.com,.example2.com"
                          }
                          }

                          Make sure you include the protocol in the httpProxy setting. i.e. "httpProxy": "http://**your-proxy-host..." and **not "httpProxy": "your-proxy-host..."
                          Once I did this, the fetches were successful.





                          share








                          New contributor




                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          I was getting the same symptoms until I followed the steps in Docker network config.



                          i.e.
                          - vi ~/.docker/config.json
                          - Update and add:
                          ,"proxies":
                          {
                          "default":
                          {
                          "httpProxy": "http://your-proxy-host:your-proxy-port",
                          "noProxy": "*.test.example.com,.example2.com"
                          }
                          }

                          Make sure you include the protocol in the httpProxy setting. i.e. "httpProxy": "http://**your-proxy-host..." and **not "httpProxy": "your-proxy-host..."
                          Once I did this, the fetches were successful.






                          share








                          New contributor




                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 3 mins ago









                          rojroj

                          101




                          101




                          New contributor




                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          roj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477894%2fapk-tool-gives-permission-denied%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Accessing regular linux commands in Huawei's Dopra Linux

                              Can't connect RFCOMM socket: Host is down

                              Kernel panic - not syncing: Fatal Exception in Interrupt