Difference between revisions of "C linux development"

From Teknologisk videncenter
Jump to: navigation, search
m
m (Debian based distro)
 
(25 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
=Debian based distro=
 
=Debian based distro=
 
Probably more packages than you need...  
 
Probably more packages than you need...  
 +
Copy and paste the text below into your privileged shell session.
 +
 +
'''IMPORTANT''': Run '''apt update''' and '''apt upgrade''' first!
 +
*'''(Read first and check security riscs)'''
 
<source lang=bash>
 
<source lang=bash>
 +
cd ~; cat << 'EOF' > updatescript
 +
#!/usr/bin/env bash
 
sudo apt -y update
 
sudo apt -y update
 
sudo apt -y upgrade
 
sudo apt -y upgrade
sudo apt -y install build-essential
+
 
sudo apt -y install manpages-dev
+
LIST="man-db build-essential manpages-dev glibc-doc dpkg-dev linux-doc
sudo apt -y install glibc-doc
+
        user-mode-linux-doc libssl-dev docbook docbook-xml devscripts
sudo apt -y install dpkg-dev
+
        docbook-xsl xsltproc libsystemd-dev libltdl-dev libcjson1
sudo apt -y install linux-doc
+
        libcjson-dev libltdl-dev gdb tmux"
sudo apt -y install user-mode-linux-doc
+
LOGFILE="./apt-install.log"
sudo apt-get install libssl-dev
+
echo "" > $LOGFILE
sudo apt-get install docbook docbook-xml docbook-xsl
+
DIRTY=0
sudo apt-get install xsltproc
+
 
sudo apt-get install libsystemd-dev
+
for PACK in $LIST
sudo apt install libcjson1 libcjson-dev
+
do
 +
        printf "Installerer %s\n" $PACK
 +
        if apt -y install $PACK
 +
        then
 +
                printf "Package %s OK\n" $PACK >> $LOGFILE
 +
        else
 +
                printf "Package %s FAILED......................\n" $PACK >> $LOGFILE
 +
                let DIRTY=DIRTY+1
 +
        fi
 +
done
 +
printf "\n\n**************************************************\n"
 +
if test $DIRTY -eq 0
 +
then
 +
        printf "Seems all look good - all packages OK\n"
 +
else
 +
        printf "ERROR: %d packages failed - see logfile: %s\n" $DIRTY $LOGFILE
 +
fi
 +
printf "**************************************************\n"
 +
EOF
 +
chmod +x updatescript
 +
sudo ./updatescript
 
</source>
 
</source>
 +
<!-------- FIRST SCRIPT
 +
<source lang=bash>
 +
cd ~; cat << EOF > updatescript
 +
#!/usr/bin/env bash
 +
set -x
 +
apt -y update
 +
apt -y upgrade
 +
apt -y install build-essential
 +
apt -y install manpages-dev
 +
apt -y install glibc-doc
 +
apt -y install dpkg-dev
 +
apt -y install linux-doc
 +
apt -y install user-mode-linux-doc
 +
apt -y install libssl-dev
 +
apt -y install docbook docbook-xml docbook-xsl
 +
apt -y install xsltproc
 +
apt -y install libsystemd-dev
 +
apt -y install libcjson1 libcjson-dev
 +
EOF
 +
chmod +x updatescript
 +
sudo ./updatescript
 +
rm updatescript
  
 +
</source>
 +
----->
  
 
[[Category:Linux]][[Category:C]][[Category:GNU]]
 
[[Category:Linux]][[Category:C]][[Category:GNU]]

Latest revision as of 06:51, 8 August 2024

Debian based distro

Probably more packages than you need... Copy and paste the text below into your privileged shell session.

IMPORTANT: Run apt update and apt upgrade first!

  • (Read first and check security riscs)
cd ~; cat << 'EOF' > updatescript
#!/usr/bin/env bash
sudo apt -y update
sudo apt -y upgrade

LIST="man-db build-essential manpages-dev glibc-doc dpkg-dev linux-doc
        user-mode-linux-doc libssl-dev docbook docbook-xml devscripts
        docbook-xsl xsltproc libsystemd-dev libltdl-dev libcjson1
        libcjson-dev libltdl-dev gdb tmux"
LOGFILE="./apt-install.log"
echo "" > $LOGFILE
DIRTY=0

for PACK in $LIST
do
        printf "Installerer %s\n" $PACK
        if apt -y install $PACK
        then
                printf "Package %s OK\n" $PACK >> $LOGFILE
        else
                printf "Package %s FAILED......................\n" $PACK >> $LOGFILE
                let DIRTY=DIRTY+1
        fi
done
printf "\n\n**************************************************\n"
if test $DIRTY -eq 0
then
        printf "Seems all look good - all packages OK\n"
else
        printf "ERROR: %d packages failed - see logfile: %s\n" $DIRTY $LOGFILE
fi
printf "**************************************************\n"
EOF
chmod +x updatescript
sudo  ./updatescript