user4181: Hi am trying to setup cardano-wallet locally through wsl2 via this guide https://developers.cardano.org/docs/get-started/installing-cardano-wallet/
On the step where it asks to enter this command cp -p "dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-2021.5.26/x/cardano-wallet/build/cardano-wallet/cardano-wallet" ~/.local/bin/  I get an error stating the file directory cannot be found. cabal build all leaves me with two cardano wallet folders that i think maybe in need to point to

dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-launcher-2021.9.9
dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-core-2021.9.9

Is the specified directory somewhere in there? there is no x/cardano-wallet/build/cardano-wallet/cardano-wallet to be seen :(
Note: I did configure cabal with cabal configure --with-compiler=ghc-8.10.4" instead of cabal configure --with-compiler=ghc-8.10.4 --constraint="random<1.2" as the prior was not letting me sucessfully build.
Any help would be greatly appreciated.

user2092: Working Backwards
Major edit: There is a reason the docs are explicit about ghc-8.10.4. I just hit this weird error that went away after downgrading from 8.10.7:
$ cabal build all
cabal: Cannot find the program 'ghc'. User-specified path 'ghc-8.10.5' does
not refer to an executable and the program is not on the system path.

Edit: I think you actually did what you were supposed to do and checked out the latest tag (at the time of writing): https://github.com/input-output-hk/cardano-wallet/tree/v2021-09-09
Yeah, like I was saying, the guides don't always keep up with versions and dependencies. I'm sure the wallet built with ghc-8.10.7 is completely fine, and worth testing out to let the GitHub maintainers know to update their docs.
Solution for You
However, they are probably very well aware of this, and so if must, you can always switch to 8.10.4:
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4

You can start again from:
cabal configure --with-compiler=ghc-8.10.4 
(Or even the next line).
Now, their guide should match up as they intended. However, I'd still ask about using 8.10.7... and maybe updating the guide depending on the answer.
If you need to reclaim space, you can remove some stuff:
ghcup rm ghc 8.10.7
du -hs ~/.cabal
rm -rf ./cabal

I would just replace with 2021.5.26 with 2021.9.9, andw= when all is done, run cardano-wallet version to see that you are in fact on the latest build.
$ cp -d "dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-2021.9.9/x/cardano-wallet/build/cardano-wallet/cardano-wallet" ~/.local/bin/
$ cardano-wallet version
v2021-09-09 (git revision: 011a258c1b5ba57ca70f13346109ce3074820032)


4181: <p>Hi am trying to setup cardano-wallet locally through wsl2 via this guide <a href="https://developers.cardano.org/docs/get-started/installing-cardano-wallet/" rel="nofollow noreferrer">https://developers.cardano.org/docs/get-started/installing-cardano-wallet/</a></p>
<p>On the step where it asks to enter this command <code>cp -p &quot;dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-2021.5.26/x/cardano-wallet/build/cardano-wallet/cardano-wallet&quot; ~/.local/bin/ </code> I get an error stating the file directory cannot be found. <code>cabal build all</code> leaves me with two cardano wallet folders that i think maybe in need to point to</p>
<ul>
<li>dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-launcher-2021.9.9</li>
<li>dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-core-2021.9.9</li>
</ul>
<p>Is the specified directory somewhere in there? there is no <code>x/cardano-wallet/build/cardano-wallet/cardano-wallet</code> to be seen :(</p>
<p>Note: I did configure cabal with <code>cabal configure --with-compiler=ghc-8.10.4&quot;</code> instead of <code>cabal configure --with-compiler=ghc-8.10.4 --constraint=&quot;random&lt;1.2&quot;</code> as the prior was not letting me sucessfully build.</p>
<p>Any help would be greatly appreciated.</p>
 2092: <h1>Working Backwards</h1>
<p>Major edit: There is a reason the docs are explicit about <code>ghc-8.10.4</code>. I just hit this weird error that went away after downgrading from 8.10.7:</p>
<pre><code>$ cabal build all
cabal: Cannot find the program 'ghc'. User-specified path 'ghc-8.10.5' does
not refer to an executable and the program is not on the system path.
</code></pre>
<p>Edit: I think you actually did what you were supposed to do and checked out the latest tag (at the time of writing): <a href="https://github.com/input-output-hk/cardano-wallet/tree/v2021-09-09" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-wallet/tree/v2021-09-09</a></p>
<p>Yeah, like I was saying, the guides don't always keep up with versions and dependencies. I'm sure the wallet built with <code>ghc-8.10.7</code> is completely fine, and worth testing out to let the GitHub maintainers know to update their docs.</p>
<h1>Solution for You</h1>
<p>However, they are probably very well aware of this, and so if must, you can always switch to 8.10.4:</p>
<pre><code>ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
</code></pre>
<p>You can start again from:</p>
<p><code>cabal configure --with-compiler=ghc-8.10.4 </code></p>
<p>(Or even the next line).</p>
<p>Now, their guide should match up as they intended. However, I'd still ask about using 8.10.7... and maybe updating the guide depending on the answer.</p>
<p>If you need to reclaim space, you can remove some stuff:</p>
<pre><code>ghcup rm ghc 8.10.7
du -hs ~/.cabal
rm -rf ./cabal
</code></pre>
<p>I would just replace with <code>2021.5.26</code> with <code>2021.9.9</code>, andw= when all is done, run <code>cardano-wallet version</code> to see that you are in fact on the latest build.</p>
<pre><code>$ cp -d &quot;dist-newstyle/build/x86_64-linux/ghc-8.10.4/cardano-wallet-2021.9.9/x/cardano-wallet/build/cardano-wallet/cardano-wallet&quot; ~/.local/bin/
$ cardano-wallet version
v2021-09-09 (git revision: 011a258c1b5ba57ca70f13346109ce3074820032)
</code></pre>
