Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to restart mihomo.service: Unit mihomo.service not found. #157

Closed
syx-413 opened this issue Jan 2, 2024 · 8 comments
Closed

Failed to restart mihomo.service: Unit mihomo.service not found. #157

syx-413 opened this issue Jan 2, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@syx-413
Copy link

syx-413 commented Jan 2, 2024

Describe the bug
When I try to update mihoro, the system reports that the mihomo.service unit is not found.

To Reproduce
Steps to reproduce the behavior:
1.Open the terminal
2.Enter and run the command mihoro update
3. Observe the error message: Failed to restart mihomo.service: Unit mihomo.service not found.

Expected behavior
I expect mihoro to update normally and mihomo.service to be successfully found and restarted.
Screenshots
截图 2024-01-02 22-59-20
截图 2024-01-02 22-59-37

Additional context
I am using the Arch Linux operating system with a x86_64-unknown-linux-gnu architecture. I encountered this problem when trying to update mihoro.

@syx-413 syx-413 added the bug Something isn't working label Jan 2, 2024
@spencerwooo
Copy link
Owner

Did you run mihoro setup after installation? Please check for the path user_systemd_root defined inside mihoro.toml and see if the systemd file has been created.

@spencerwooo
Copy link
Owner

Sorry if setup instructions are not clear. I am still transitioning mihoro from the original clashrup and not all documentation are refactored.

@syx-413
Copy link
Author

syx-413 commented Jan 3, 2024

Did you run mihoro setup after installation? Please check for the path user_systemd_root defined inside mihoro.toml and see if the systemd file has been created.安装后是否运行了 mihoro setup ?请检查 mihoro.toml 中定义的路径 user_systemd_root ,并查看是否已创建systemd文件。
image
image
image

I referred clashrup(maybe) it still dont work.
Perhaps a manual is needed.

@spencerwooo
Copy link
Owner

spencerwooo commented Jan 3, 2024

This project (mihoro) only references ~/.config/systemd/user/mihomo.service by default. I think you need to perform a full removal of clashrup components and clash components, and run mihoro setup again. Please try following these steps:

  • (If you still have clashrup installed): clashrup uninstall
  • Uninstall mihoro: mihoro uninstall
  • Remove mihomo: rm -R ~/.local/bin/mihomo ~/.config/mihomo
  • Remove clash: rm -R ~/.local/bin/clash ~/.config/clash
  • Remove clash.service: rm -R ~/.config/systemd/user/clash.service
  • Double check mihoro config (~/.config/mihoro.toml) and reinstall mihoro: mihoro setup

Do note that clash and mihomo have diverged and have different configuration and binary paths. This project has refactored to use the mihomo kernel, and thus, use mihomo paths.

Please provide your ~/.config/mihoro.toml and ~/.config/systemd/user/mihomo.service if things are still not working. (Please redact sensitive information.)

@syx-413
Copy link
Author

syx-413 commented Jan 4, 2024

image

mihoro.toml

截图 2024-01-04 13-43-28

When I use the dashboard, it will appear,is it because I am using a dual system?i

image

@spencerwooo
Copy link
Owner

Can you try executing ~/.local/bin/mihomo directly? What are the outputs?

@syx-413
Copy link
Author

syx-413 commented Jan 4, 2024

Can you try executing ~/.local/bin/mihomo directly? What are the outputs?

image

@spencerwooo
Copy link
Owner

I'm not sure what's wrong, everything seems ok :(

@syx-413 syx-413 closed this as completed Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants