Results 1 to 7 of 7

Thread: Need help setting up openSUSE for "C Programming in Linux" book

  1. #1

    Default Need help setting up openSUSE for "C Programming in Linux" book

    I'm reading a book called "C Programming in Linux" for this I need these packages:


    1. Base Development (pattern)
    2. Web and LAMP Server (pattern)
    3. apache2-devel
    4. libmysqlclient-devel
    5. gd
    6. gd-devel


    Only items 4 and 5 are not installed and I'm unable to find them on YaST2.

    I also need to move certain files which I compile to "/srv/www/cgi-bin/" folder, as I'm logging in "Live-CD User", which is not root, I'm unable to move files to that folder.

    As a workaround the book suggests I modify the file "/etc/apache2/defaul-server.conf" and change references to a public folder but here also I'm running into same problems, I'm able to locate "default-server.conf" file and read it but I can't modify it.

    If I need to make a reference to a folder inside public folder, do I just type it as "/public/folder name"?

  2. #2

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    On 02/07/2019 07:26 AM, noviceUser wrote:
    >
    > I'm reading a book called "C Programming in Linux" for this I need these
    > packages:
    >
    > - Base Development (pattern)
    > - Web and LAMP Server (pattern)
    > - apache2-devel
    > - libmysqlclient-devel
    > - gd
    > - gd-devel
    >
    > Only items 4 and 5 are not installed and I'm unable to find them on
    > YaST2.


    Which version of openSUSE are you using, exactly? Tumbleweed or Leap plus
    version version information would possibly help. If you posted that
    already I apologize for missing it.

    > I also need to move certain files which I compile to "/srv/www/cgi-bin/"
    > folder, as I'm logging in "Live-CD User", which is not root, I'm unable
    > to move files to that folder.


    You'll need to become root unless somehow you have a LiveCD that changes
    the normal permissions on root-owned directories significantly (unlikely,
    but if it came with the book then maybe so).

    > As a workaround the book suggests I modify the file
    > "/etc/apache2/defaul-server.conf" and change references to a public
    > folder but here also I'm running into same problems, I'm able to locate
    > "default-server.conf" file and read it but I can't modify it.


    Again you must become 'root' or equivalent to modify what are likely
    root-owned files. Try the following when on the box normally:

    Code:
    sudo -i
    Hopefully you'll just become 'root' and then you can try things.

    Out of curiosity, how are you making YaST2 work if you are not 'root'? It
    might load, but without privileges you definitely should not be able to do
    things like install packages.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below.

    If you want to send me a private message, please let me know in the
    forum as I do not use the web interface often.

  3. #3

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    I'm using the latest Tumbleweed live image from thumb drive, I have no idea how the YaST2 is working, I go to it's interface and search for what I want to install, sometimes it asks for root password, as I'm using live image, I just press "Enter" without typing anything and it proceeds to install.

    I have GNOME image, but I'm using Cinnamon, and I don't want to do this through command line, I prefer to do it through GUI, so how can I switch to root on the spot?

  4. #4

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    On 02/07/2019 08:16 AM, noviceUser wrote:
    >
    > I'm using the latest Tumbleweed live image from thumb drive, I have no
    > idea how the YaST2 is working, I go to it's interface and search for
    > what I want to install, sometimes it asks for root password, as I'm
    > using live image, I just press "Enter" without typing anything and it
    > proceeds to install.


    Perhaps it is auto-prompting to handle the 'sudo' bit for you, and perhaps
    'root' has a zero-length password since otherwise pressing [Enter] alone
    would not help you.

    > I have GNOME image, but I'm using Cinnamon, and I don't want to do this
    > through command line, I prefer to do it through GUI, so how can I switch


    Well that seems like a bad start to a career or hobby in programming, but
    I guess to each their own. Speaking from a lot of experience in both
    worlds, I cannot emphasize enough how beneficial knowing the command line is.

    > to root on the spot?


    I usually use KDE, but try running 'gksu gedit' or something since Google
    seems to think that 'gksu' is the way to launch GUI things as 'root' in
    Gnome-land.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below.

    If you want to send me a private message, please let me know in the
    forum as I do not use the web interface often.

  5. #5

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    What about these packages?


    • libmysqlclient-devel
    • gd


    I'm unable to find them on YaST2?

    How would I copy compiled files to /srv/www/cgi-bin/ without being root?

    What you suggested seems to be only for editing.

  6. #6
    Join Date
    Sep 2012
    Posts
    4,916

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    Quote Originally Posted by noviceUser View Post

    • libmysqlclient-devel
    MySQL was replaced by MariaDB, it is provided by libmariadb-devel (zypper se --provides libmysqlclient-devel).

    • gd

    I see it in package list on normal TW installation using default Internet repositories on download.opensuse.org. I do not know what repositories you set up or how live version manages packages. You may need to add remote repositories.

  7. #7

    Default Re: Need help setting up openSUSE for "C Programming in Linux" book

    On 02/07/2019 10:36 AM, noviceUser wrote:
    >
    > What about these packages?
    >
    > - libmysqlclient-devel
    > - gd


    Build a VM and do a proper install and I think you'll see those are there
    normally.

    > I'm unable to find them on YaST2?


    Repository problem? What repositories do you have?

    Code:
    zypper lr -u

    > How would I copy compiled files to /srv/www/cgi-bin/ without being root?
    >
    > What you suggested seems to be only for editing.


    It's a text editor so you could open your file then save-as in the correct
    location. This would also be easy from the CLI:

    Code:
    sudo cp /home/youruser/Desktop/e-mailed-file /etc/apache2/target.conf
    It may also be worth noting that, just like anywhere else,
    downloading/running/using data from untrusted sources is risky,
    particularly when you then make those things run as 'root', so be sure you
    understand what you download before you use it.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below.

    If you want to send me a private message, please let me know in the
    forum as I do not use the web interface often.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •