Open TRANQUOCTUAN-TQT opened 8 months ago
Run Cargo as administrator: This will give Cargo the permissions it needs to create the target directory. To do this, right-click on the Cargo executable and select "Run as administrator".
Change the permissions of the directory: You can change the permissions of the directory so that you have write access. To do this, right-click on the directory and select "Properties". Then, go to the "Security" tab and click on the "Edit" button. In the "Group or user names" list, select your user account and make sure that the "Write" checkbox is checked. Click on the "Apply" button and then the "OK" button.
Bạn có thể run powershell dưới quyền admin để ko bị nữa nhé. Hoặc đặt project ở thư mục khác, ổ D chẳng hạn.
Lỗi ở đây là bạn chưa cấp quyền Write cho thư mục nhé. Bạn có thể tham khảo cách sửa lỗi ở đây: https://blogchiasekienthuc.com/thu-thuat-may-tinh/phan-quyen-file-va-folder-trong-windows.html
Bạn có thể run powershell dưới quyền admin để ko bị nữa nhé. Hoặc đặt project ở thư mục khác, ổ D chẳng hạn.
Hình như thư mục đó ko cho Quyền Write, mình nghĩ ổ đĩa D cũng dc ấy
dạ cho em hỏi là là em đã cài rustc và cargo ròi khi em tọa file thì tạo ra được nhưng mà lúc cargo run cargo build nó hiện lỗi bên dưới
thinh@DESKTOP-NIHNLB6:~$ rustc --version
cargo --version
rustc 1.75.0 (82e1608df 2023-12-21)
cargo 1.75.0 (1d8b05cdd 2023-11-20)
thinh@DESKTOP-NIHNLB6:~$ cargo new capcap
Created binary (application) capcap
package
thinh@DESKTOP-NIHNLB6:~$ cargo build
error: could not find Cargo.toml
in /home/thinh
or any parent directory
dạ cho em hỏi là là em đã cài rustc và cargo ròi khi em tọa file thì tạo ra được nhưng mà lúc cargo run cargo build nó hiện lỗi bên dưới
thinh@DESKTOP-NIHNLB6:~$ rustc --version cargo --version rustc 1.75.0 (82e1608df 2023-12-21) cargo 1.75.0 (1d8b05cdd 2023-11-20) thinh@DESKTOP-NIHNLB6:~$ cargo new capcap Created binary (application)
capcap
package thinh@DESKTOP-NIHNLB6:~$ cargo build error: could not findCargo.toml
in/home/thinh
or any parent directory
Bạn phải cd capcap
nhé, ý là trỏ tới thư mục project Rust
Bạn có thể run powershell dưới quyền admin để ko bị nữa nhé. Hoặc đặt project ở thư mục khác, ổ D chẳng hạn.
mình đã run dưới quyền admin rồi nhưng vẫn không bị chạy được á bạn
Bạn có thể run powershell dưới quyền admin để ko bị nữa nhé. Hoặc đặt project ở thư mục khác, ổ D chẳng hạn.
mình đã run dưới quyền admin rồi nhưng vẫn không bị chạy được á bạn
Bạn thử qua ổ D chưa bạn
mình chuyển qua ở D rồi mà bị lỗi này
mình chuyển qua ở D rồi mà bị lỗi này
Bạn thử chạy câu lệnh này nhé rustup target add x86_64-pc-windows-gnu
mình chuyển qua ở D rồi mà bị lỗi này
Bạn thử chạy câu lệnh này nhé
rustup target add x86_64-pc-windows-gnu
mình làm theo rồi mà vẫn không được
Bạn thử chạy cái này nhé:
rustup toolchain install stable-x86_64-pc-windows-gnu
sau đó
rustup default stable-x86_64-pc-windows-gnu
@TRANQUOCTUAN-TQT ổn ko bạn?
@TRANQUOCTUAN-TQT ổn ko bạn?
mình làm được rồi mình cảm ơn
em run bị lỗi này thì fix như nào ạ