{"id":34993,"date":"2019-01-04T02:25:18","date_gmt":"2019-01-04T02:25:18","guid":{"rendered":"http:\/\/antonini.psc.br\/?p=34993"},"modified":"2021-04-02T04:54:33","modified_gmt":"2021-04-02T04:54:33","slug":"habilitando-o-apt-get-no-damn-small-linux","status":"publish","type":"post","link":"https:\/\/antonini.ddns.net\/?p=34993","title":{"rendered":"Habilitando o apt-get no Damn Small Linux"},"content":{"rendered":"<p style=\"text-align: justify;\">Estava tentando instalar o DSL no QEMU rodando no Windows 7 s\u00f3 pra matar a saudades do Linux enquanto estou no trabalho, at\u00e9 ai tudo bem, feita a instala\u00e7\u00e3o na hora de usar o apt-get me deparei com o seguinte erro:<\/p>\n<p style=\"text-align: justify;\">apt-get command not found<\/p>\n<p style=\"text-align: justify;\">Beleza, pesquisei na internet como resolver isso e s\u00f3 encontrei isso:<\/p>\n<p style=\"text-align: justify;\"><strong>sudo dpkg-restore<\/strong><\/p>\n<p style=\"text-align: justify;\">No fluxbox App -&gt; Tools -&gt; Enable Apt<\/p>\n<p style=\"text-align: justify;\">S\u00f3 que quando executei esses procedimentos me retornou a seguinte mensagem de erro:<\/p>\n<p style=\"text-align: justify;\">wget: server return error 404: HTTP\/1.1 404 not found<br \/>\nDownload error!<\/p>\n<p style=\"text-align: justify;\">E agora? Depois disso n\u00e3o achei nenhum tutorial que me explicasse isso, ent\u00e3o comecei a tentar arrumar sozinho, at\u00e9 que encontrei uma solu\u00e7\u00e3o, e vou passa-la para voc\u00eas agora para caso algu\u00e9m tenha o mesmo problema que eu.<\/p>\n<p style=\"text-align: justify;\">Primeiro v\u00e1 para a raiz do Linux:<\/p>\n<p style=\"text-align: justify;\"><strong>cd \/<\/strong><\/p>\n<p style=\"text-align: justify;\">Ent\u00e3o execute o comando:<\/p>\n<p style=\"text-align: justify;\"><strong>sudo find | grep &#8216;dpkg-restore&#8217;<\/strong><\/p>\n<p style=\"text-align: justify;\">E a sa\u00edda ser\u00e1 mais ou menos assim:<\/p>\n<p style=\"text-align: justify;\"><strong>.\/usr\/sbin\/dpkg-restore<\/strong><\/p>\n<p style=\"text-align: justify;\">Agora vamos editar o arquivo:<\/p>\n<p style=\"text-align: justify;\"><strong>sudo vi .\/usr\/sbin\/dpkg-restore<\/strong><\/p>\n<p style=\"text-align: justify;\">Saida:<\/p>\n<p style=\"text-align: justify;\">#!\/bin\/sh<br \/>\n#(c) 2003 Robert Shingledecker<br \/>\nif [ -e \/var\/lib\/dpkg\/status ]; then<br \/>\nexit<br \/>\nelse<br \/>\n#MIRROR=$(dslrc.lua Mirror)<br \/>\n#PROTOCOL=$(dslrc.lua Protocol)<br \/>\nsudo rm -f \/var\/lib\/dpkg<br \/>\necho &#8220;Grabbing the compressed dpkg database and programs&#8230;&#8221;<br \/>\ncd `cat \/opt\/.mydsl_dir || echo \/tmp\/`<br \/>\nwget -q &#8220;$PROTOCOL&#8221;:\/\/&#8221;$MIRROR&#8221;\/mydsl\/system\/dsl-dpkg.dsl.md5.txt<br \/>\nwget &#8220;$PROTOCOL&#8221;:\/\/&#8221;$MIRROR&#8221;\/mydsl\/system\/dsl-dpkg.dsl<br \/>\nif [ -s dsl-dpkg.dsl ]; then<br \/>\nmd5sum -c dsl-dpkg.dsl.md5.txt<br \/>\nif [ $? == 0 ]; then<br \/>\n\/etc\/init.d\/mkwriteable<br \/>\n\/etc\/init.d\/mydsl-install dsl-dpkg.dsl<br \/>\necho &#8220;Updating apt-get&#8221;<br \/>\napt-get update<br \/>\nelse<br \/>\necho &#8220;Checksum error!&#8221;<br \/>\nfi<br \/>\necho -n &#8220;Press Enter key to continue&#8230;&#8221;;read gagme<br \/>\nelse<br \/>\necho &#8220;Download error!&#8221;<br \/>\necho -n &#8220;Press Enter to continue&#8230;&#8221;;read gagme<br \/>\nexit 1<br \/>\nfi<br \/>\nexit<br \/>\nfi<\/p>\n<p style=\"text-align: justify;\">Ent\u00e3o vamos comentar as duas linhas que tem wget, e adicionar os diret\u00f3rios deste site http:\/\/www.ftp.be\/packages\/damnsmalllinux\/mydsl\/system.<\/p>\n<p style=\"text-align: justify;\">Deixando o c\u00f3digo assim:<br \/>\n#!\/bin\/sh<br \/>\n#(c) 2003 Robert Shingledecker<br \/>\nif [ -e \/var\/lib\/dpkg\/status ]; then<br \/>\nexit<br \/>\nelse<br \/>\n#MIRROR=$(dslrc.lua Mirror)<br \/>\n#PROTOCOL=$(dslrc.lua Protocol)<br \/>\nsudo rm -f \/var\/lib\/dpkg<br \/>\necho &#8220;Grabbing the compressed dpkg database and programs&#8230;&#8221;<br \/>\ncd `cat \/opt\/.mydsl_dir || echo \/tmp\/`<br \/>\n#wget -q &#8220;$PROTOCOL&#8221;:\/\/&#8221;$MIRROR&#8221;\/mydsl\/system\/dsl-dpkg.dsl.md5.txt<br \/>\n#wget &#8220;$PROTOCOL&#8221;:\/\/&#8221;$MIRROR&#8221;\/mydsl\/system\/dsl-dpkg.dsl<br \/>\nwget -q http:\/\/www.ftp.be\/packages\/damnsmalllinux\/mydsl\/system\/dsl-dpkg.dsl.md5.txt<br \/>\nwget http:\/\/www.ftp.be\/packages\/damnsmalllinux\/mydsl\/system\/dsl-dpkg.dsl<br \/>\nif [ -s dsl-dpkg.dsl ]; then<br \/>\nmd5sum -c dsl-dpkg.dsl.md5.txt<br \/>\nif [ $? == 0 ]; then<br \/>\n\/etc\/init.d\/mkwriteable<br \/>\n\/etc\/init.d\/mydsl-install dsl-dpkg.dsl<br \/>\necho &#8220;Updating apt-get&#8221;<br \/>\napt-get update<br \/>\nelse<br \/>\necho &#8220;Checksum error!&#8221;<br \/>\nfi<br \/>\necho -n &#8220;Press Enter key to continue&#8230;&#8221;;read gagme<br \/>\nelse<br \/>\necho &#8220;Download error!&#8221;<br \/>\necho -n &#8220;Press Enter to continue&#8230;&#8221;;read gagme<br \/>\nexit 1<br \/>\nfi<br \/>\nexit<br \/>\nfi<\/p>\n<p style=\"text-align: justify;\">Agora \u00e9 s\u00f3 rodar novamente o comando:<\/p>\n<p style=\"text-align: justify;\"><strong>sudo dpkg-restore<\/strong><\/p>\n<p style=\"text-align: justify;\">E j\u00e1 est\u00e1 tudo funcionando :)<\/p>\n<p style=\"text-align: justify;\">Voc\u00ea pode testar instalando o lynx:<\/p>\n<p style=\"text-align: justify;\">sudo apt-get -f install lynx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Estava tentando instalar o DSL no QEMU rodando no Windows 7 s\u00f3 pra matar a saudades do Linux enquanto estou no trabalho, at\u00e9 ai tudo bem, feita a instala\u00e7\u00e3o na hora de usar o apt-get me deparei com o seguinte erro: apt-get command not found Beleza, pesquisei na internet como resolver isso e s\u00f3 encontrei [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-34993","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/34993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34993"}],"version-history":[{"count":1,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/34993\/revisions"}],"predecessor-version":[{"id":34994,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/34993\/revisions\/34994"}],"wp:attachment":[{"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antonini.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}