installing matlab and simulink on pi - 'verifying sudo user privilege failed'
조회 수: 11 (최근 30일)
이전 댓글 표시
hi there,
i am trying to install matlab and simulink on my raspberry pi, but i keep getting the error 'verifying sudo user privilege failed'
i have followed the steps in this article by matlab and enabled passwordless sudo but it still isn't working.
Anybody encountered this problem before?
Thanks
댓글 수: 1
Hakam Agha
2019년 10월 27일
Hi Ross,
Did manage to resolve your issue? I am having the same problem and can not find a solution. I followed the steps proposed by matlab but with no luck.
If you solved your issue I will appriciate if you let me know how to fix it.
Thanks
답변 (1개)
Sanchari
2024년 7월 26일
Hello Ross,
The error message "verifying sudo user privilege failed" indicates that MATLAB is having trouble verifying that the user on the Raspberry Pi has the necessary sudo privileges. This can happen even if the passwordless sudo have been set up correctly. Here are some steps to troubleshoot and resolve this issue:
Step 1. Verify Passwordless Sudo: Ensure that the user is correctly set up for passwordless sudo. Do this by editing the sudoers file as follows:
sudo visudo %Open the sudoers file using visudo
Add the following line at the end of the file, replacing "your_username" with your actual username:
your_username ALL=(ALL) NOPASSWD:ALL
Save and exit the editor. If using "nano", do this by pressing "Ctrl+X", then "Y", and then "Enter".
Step 2. Verify Sudo Privileges: Log in to the Raspberry Pi and verify that sudo commands can be executed without being prompted for a password:
sudo ls /root
If this command executes without asking for a password and lists the contents of the "/root" directory, passwordless sudo is correctly configured.
Step 3. Check SSH Configuration: Ensure that the SSH configuration allows for the necessary operations. Consider modifying the SSH configuration file with the following commands:
% Open the SSH configuration file
sudo nano /etc/ssh/sshd_config
% Ensure that the following lines are present and not commented out
PermitRootLogin yes
PasswordAuthentication yes
% Save and exit the editor, then restart the SSH service
sudo systemctl restart ssh
Step 4. Use MATLAB's Hardware setup: Use MATLAB's Hardware Setup process to configure your Raspberry Pi. This can help ensure that all necessary settings are correctly applied. Go to MATLAB toolstrip > Home tab > Add-Ons > Get Hardware Support Packages. Follow the prompts to install the Raspberry Pi support package. During this process, it will be prompted to enter the Raspberry Pi's IP address, username, and password. Ensure that the correct credentials are being entered.
Step 5. Manual Installation: If the automatic setup continues to fail, try to manually install the necessary software on the Raspberry Pi.
- Install Required Packages using the following commands.
sudo apt-get update
sudo apt-get install -y matlab-support
- Configure MATLAB on PC: Open MATLAB on PC and use the "raspi" command to connect the Raspberry Pi.
r = raspi('your_pi_ip_address', 'your_username', 'your_password');
Step 6. Check for Errors: If continuing to encounter issues, check the MATLAB command window and the Raspberry Pi logs for more specific error messages. This can provide more insight into what might be going wrong.
Please consider to check the following link on detailed instructions to set up Raspberry Pi: Install Support for Raspberry Pi Hardware - MATLAB & Simulink (mathworks.com)
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!