# Break in code when trying to test contract

**URL:** <https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943>\
**Category:** Tooling and IDE\
**Tags:** fuelup\
**Created:** [July 28, 2023, 7:15am UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943 "2023-07-28T07:15:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![robberdom](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@robberdom](https://forum.fuel.network/u/robberdom)\
**Post date:** [July 28, 2023, 7:15am UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/1 "2023-07-28T07:15:59Z")

</div>

I’m following the instructions to build the counter smart contract and everything works fine till I run ‘cargo install cargo-generate’ which comes after compilation. This is what i get:

 ![Screenshot (135)](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/e/e29a4851bd48d4d5664303d26db604edfb1f7049.png)

- When i Run `$ fuelup show` i get this:

````plaintext
fuelup home: /root/.fuelup

installed toolchains
--------------------
beta-3-x86_64-unknown-linux-gnu (default)
latest-x86_64-unknown-linux-gnu

active toolchain
-----------------
beta-3-x86_64-unknown-linux-gnu (default)
  forc : 0.37.3
    - forc-client
      - forc-deploy : 0.37.3
      - forc-run : 0.37.3
    - forc-doc : 0.37.3
    - forc-explore : 0.28.1
    - forc-fmt : 0.37.3
    - forc-index : 0.18.4
    - forc-lsp : 0.37.3
    - forc-tx : 0.37.3
    - forc-wallet : 0.2.2
  fuel-core : 0.17.11
  fuel-indexer : 0.18.4

fuels versions
---------------
forc : 0.39```

- Link to full scope of the codebase: https://fuelbook.fuel.network/master/quickstart/smart-contract.html
- I'm on a windows machine but i run my environment on the linux subsystem.
````

---

<div class="post-metadata">

**Author:** ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)\
**Post date:** [July 28, 2023, 8:49am UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/2 "2023-07-28T08:49:45Z")

</div>

Hey @robberdom doesn’t seem like a Fuel issue but a dependency issue. Take a look at [linux - How do I fix the Rust error "linker 'cc' not found" for Debian on Windows 10? - Stack Overflow](https://stackoverflow.com/questions/52445961/how-do-i-fix-the-rust-error-linker-cc-not-found-for-debian-on-windows-10)

---

<div class="post-metadata">

**Author:** ![robberdom](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@robberdom](https://forum.fuel.network/u/robberdom)\
**Post date:** [July 30, 2023, 5:07pm UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/3 "2023-07-30T17:07:41Z")

</div>

thanks, fren. i tried it and installed everything successfully. this is what i got still:

```auto
Updating crates.io index
error: binary `cargo` already exists in destination
Add --force to overwrite
error: there is nothing to install in `generate v1.5.0`, because it has no binaries
`cargo install` is only for installing programs, and can't be used with libraries.
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.
     Summary Failed to install cargo, generate (see error(s) above).
error: some crates failed to install

```

---

<div class="post-metadata">

**Author:** ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)\
**Post date:** [July 31, 2023, 1:56am UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/4 "2023-07-31T01:56:06Z")

</div>

Hey @robberdom still doesn’t look like a Fuel issue but looks like something wrong with your binaries. Have you tried the suggestion of forcing the overwrite?

---

<div class="post-metadata">

**Author:** ![robberdom](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@robberdom](https://forum.fuel.network/u/robberdom)\
**Post date:** [August 1, 2023, 11:27am UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/5 "2023-08-01T11:27:19Z")

</div>

no, i haven’t. how can i do that, please? @calldelegation

---

<div class="post-metadata">

**Author:** ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)\
**Post date:** [August 1, 2023, 3:52pm UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/6 "2023-08-01T15:52:20Z")

</div>

Hey @robberdom I was talking specifically within the error message you got.

```auto
error: binary `cargo` already exists in destination
Add --force to overwrite

```

After you have set up your environment properly you should be able to run

```auto
cargo install cargo-generate

```

Closing this for now as this is not a Fuel issue.

---

<div class="post-metadata">

**Author:** ![calldelegation](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/calldelegation/32/1484_2.png) [@calldelegation](https://forum.fuel.network/u/calldelegation)\
**Post date:** [August 1, 2023, 3:52pm UTC](https://forum.fuel.network/t/break-in-code-when-trying-to-test-contract/2943/7 "2023-08-01T15:52:29Z")

</div>


