java.lang.IllegalArgumentException: Invalid path to cargo /usr/bin/cargo

GitHub | LooMaclin | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    IDE Fatal error when run cargo command, without installed cargo

    GitHub | 6 months ago | LooMaclin
    java.lang.IllegalArgumentException: Invalid path to cargo /usr/bin/cargo

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalid path to cargo /usr/bin/cargo

      at org.rust.cargo.commands.Cargo.<init>()
    2. org.rust.cargo
      CargoRunState.startProcess
      1. org.rust.cargo.commands.Cargo.<init>(Cargo.kt:33)
      2. org.rust.cargo.toolchain.RustToolchain.cargo(RustToolchain.kt:49)
      3. org.rust.cargo.runconfig.CargoRunState.startProcess(CargoRunState.kt:24)
      3 frames
    3. Openapi
      CommandLineState.execute
      1. com.intellij.execution.configurations.CommandLineState.execute(CommandLineState.java:80)
      1 frame
    4. IDEA
      ExecutionManagerImpl$3.run
      1. com.intellij.execution.impl.DefaultJavaProgramRunner.doExecute(DefaultJavaProgramRunner.java:93)
      2. com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericProgramRunner.java:43)
      3. com.intellij.execution.impl.ExecutionManagerImpl.lambda$startRunProfile$3(ExecutionManagerImpl.java:380)
      4. com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
      5. com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
      6. com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
      7. com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
      8. com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
      9. com.intellij.execution.impl.ExecutionManagerImpl.lambda$startRunProfile$4(ExecutionManagerImpl.java:417)
      10. com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(ExecutionManagerImpl.java:292)
      11. com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.java:417)
      12. com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:40)
      13. com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:61)
      14. com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50)
      15. com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:118)
      16. com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:117)
      17. com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:67)
      18. com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:509)
      18 frames
    5. Openapi
      QueueProcessor.runSafely
      1. com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:222)
      1 frame
    6. IDEA
      LaterInvocator$FlushQueue.run
      1. com.intellij.util.Alarm$Request$1.run(Alarm.java:378)
      2. com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:291)
      3. com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:326)
      4. com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:310)
      4 frames
    7. Java RT
      EventQueue.dispatchEvent
      1. java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      2. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      3. java.awt.EventQueue.access$500(EventQueue.java:97)
      4. java.awt.EventQueue$3.run(EventQueue.java:709)
      5. java.awt.EventQueue$3.run(EventQueue.java:703)
      6. java.security.AccessController.doPrivileged(Native Method)
      7. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      8. java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      8 frames
    8. IDEA
      IdeEventQueue.dispatchEvent
      1. com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:829)
      2. com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:665)
      3. com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
      3 frames
    9. Java RT
      EventDispatchThread.run
      1. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      2. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      3. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      4. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      5. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      6. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      6 frames