Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7901261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:10:33+00:00 2026-06-03T09:10:33+00:00

I’m creating a small deb package to install a few files. Some of them

  • 0

I’m creating a small deb package to install a few files. Some of them will be located in /usr/lib/mypackage/ and I want to create a symlink from /usr/lib/mypackage/mybin to /usr/bin/mybin

For the /usr/lib/mypackage folder I’m using mypackage.install and copy the files over there. This seems to work fine.

However, in order to create my symlink I understand I need to use the debian rules file in there, and I’m not sure how to proceed, here is the line I need to add, where should it be added and how? Thanks

ln -s /usr/lib/mypackage/mybin /usr/bin/mybin
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:10:34+00:00Added an answer on June 3, 2026 at 9:10 am

    The best way is to use dh_link, part of the debhelper suite. See man dh_link for details of its operation. As you can see from that, that you probably want something like the following in a file called debian/$mypackage.links:

    /usr/lib/mypackage/mybin  /usr/bin/mybin
    

    Where you should put dh_link in your debian/rules, if it’s not already there, depends on how you’re making your package. If you’re using Debhelper, then your debian/rules probably already has dh_link taken care of (although if you’re using classic Debhelper, then the dh_link line might be commented out, and you need to uncomment it). Using newer-style Debhelper (dh) or CDBS-plus-debhelper (include /usr/share/cdbs/1/rules/debhelper.mk) also count here; they’ll take care of dh_link for you.

    But if you’re not using Debhelper, and you don’t want to start, then dh_link probably isn’t an option. In that case, you just need to make sure that you conform to Debian Policy on the subject (meaning your symlink there should be relative, not absolute). You’d probably want to make the link in your debian/rules‘s build target. Example:

    build:
        # ... other stuff ...
        mkdir -p debian/$mypackage/usr/bin
        ln -s ../lib/mypackage/mybin debian/$mypackage/usr/bin/mybin
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have an array which has BIG numbers and small numbers in it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.