<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://shaozk.xyz/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https:&#x2F;&#x2F;shaozk.xyz</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>vcpkg</tabi:current_section>
    </tabi:metadata><title>shaozk - vcpkg</title>
    <link href="https://shaozk.xyz/tags/vcpkg/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://shaozk.xyz/tags/vcpkg/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2025-01-17T00:00:00+00:00</updated><id>https://shaozk.xyz/tags/vcpkg/atom.xml</id><entry xml:lang="en">
        <title>vcpkg手动下载源码包踩坑记录</title>
        <published>2025-01-17T00:00:00+00:00</published>
        <updated>2025-01-17T00:00:00+00:00</updated>
        <author>
            <name>shaozk</name>
        </author>
        <link rel="alternate" href="https://shaozk.xyz/csdn/15-vcpkg-manual-download-troubleshooting/" type="text/html"/>
        <id>https://shaozk.xyz/csdn/15-vcpkg-manual-download-troubleshooting/</id>
        
            <content type="html">&lt;h2 id=&quot;qian-yan&quot;&gt;前言&lt;&#x2F;h2&gt;
&lt;p&gt;在使用vcpkg工具自动安装三方库时，经常会碰到网络问题，导致无法下载源码包而失败。这个时候上网查资料发现可以通过手动下载三方库源码包来避免这个问题，然而我还是踩坑了……&lt;&#x2F;p&gt;
&lt;h2 id=&quot;cai-keng&quot;&gt;踩坑&lt;&#x2F;h2&gt;
&lt;p&gt;事情是这样，我在使用vspkg安装nanosvg库时，遇到错误，截图如下：
&lt;img src=&quot;&#x2F;csdn&#x2F;15_1.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;经过一番搜寻，解决方案大概可以总结为：&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;找到源码包网址并下载（在上面的错误信息中有）&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;将下载好的包放入vcpkg的下载目录： &lt;code&gt;${VPKCG_ROOT}&#x2F;downloads&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;执行无需下载的安装指令： &lt;code&gt;vcpkg install nanosvg --no-download&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;我老老实实按照上面的步骤操作，但问题还是没解决……&lt;&#x2F;p&gt;
&lt;h2 id=&quot;tiao-keng&quot;&gt;跳坑&lt;&#x2F;h2&gt;
&lt;p&gt;在我仔细查看错误信息的时候，发现源码包名居然和手动下载的不一样！！！手动下载的包名少了 &lt;code&gt;memononen-&lt;&#x2F;code&gt; 前缀，真是服了！
&lt;img src=&quot;&#x2F;csdn&#x2F;15_2.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;csdn&#x2F;15_3.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;于是我马上将包名手动修改后再执行步骤3，结果Amazing，成功了！
&lt;img src=&quot;&#x2F;csdn&#x2F;15_4.png&quot; alt=&quot;&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;谢天谢地问题总算是解决了，值得一提的是 &lt;code&gt;memononen&lt;&#x2F;code&gt; 是该开源库的作者。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;zong-jie&quot;&gt;总结&lt;&#x2F;h2&gt;
&lt;p&gt;在后面一些其他手动下载源码包的案例中，我发现不仅仅是前缀有差异，还有各种各样的不同。所以在修改的时候最好直接复制包名，该 &lt;code&gt;Ctrl-C+V&lt;&#x2F;code&gt; 的时候可以 &lt;code&gt;Ctrl-C+V&lt;&#x2F;code&gt; 。&lt;&#x2F;p&gt;
&lt;p&gt;不知道这算不算是vcpkg的一个bug，反正手动下载就会遇到这个问题。希望早日所有三方库能自动下载不报错！&lt;&#x2F;p&gt;
</content>
        </entry>
</feed>
